Problems evaluating cell value when cell refers to different sheet

Hi,
I'v read a lot of posts regarding excel parsing, however, none of it
helped me.
I'm using POI API to parse my worksheets. The excel files that I need to parse contain references to other excel files or different sheets in the same file.
Following is the error trace that I'm getting :
java.lang.IndexOutOfBoundsException: Index: 27, Size: 7
     at java.util.ArrayList.RangeCheck(Unknown Source)
     at java.util.ArrayList.get(Unknown Source)
     at org.apache.poi.hssf.usermodel.HSSFWorkbook.getSheetAt(HSSFWorkbook.java:562)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:374)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef2DEval(HSSFFormulaEvaluator.java:530)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:339)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.getEvalForCell(HSSFFormulaEvaluator.java:494)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:362)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef2DEval(HSSFFormulaEvaluator.java:530)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:339)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef2DEval(HSSFFormulaEvaluator.java:530)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:339)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef2DEval(HSSFFormulaEvaluator.java:530)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:339)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef2DEval(HSSFFormulaEvaluator.java:530)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:339)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.pushRef3DEval(HSSFFormulaEvaluator.java:567)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.internalEvaluate(HSSFFormulaEvaluator.java:349)
     at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate(HSSFFormulaEvaluator.java:192)
     at com.qval.parser.ExcelParser.main(ExcelParser.java:54)
Since I had put the whole source code in my classpath, I was able to debug the code.
I would like to explain the situation :
A Workbook object had following attributes as :
boundsheets (ArrayList) : size 7;
and
externSheet (ExternSheetRecord object)
has 'field_1_number_of_REF_sturcutres' = 67
and a couple of values in 'field_2_REF_structures' are [  ...,  supbookindex =2
1stsbindex =2
lastsbindex =2
, supbookindex =2
*1stsbindex* =27
lastsbindex =27, ...]
Error comes when while evaluation, sheets at index 27 (using, 1stsbindex =26 ) is retreived. Since size of boundsheets is only 7, we get an IndexOutOfBoundsException.
I wanted to ask, is it the problem with the Excel that I'm using?
And, Is there any workaround of parsing using the same Excel file?
Thanks,
igitz

use getDateCellValue() to get the java Date value and format it yourself.

Similar Messages

  • In NUMBERS, on a iPad3, how do I get 1 cell to transfer to another cell on a different sheet?

    In NUMBERS, on a iPad3, how do I get 1 cell to transfer to another cell on a different sheet? Exm... Van 1, Auto Log, C7 to transfer over to Monthly report, April, C3

    Right-click on one of the other section headers. In the context menu that appears, make sure there is a checkmark in File Handling.

  • How can i use a number from a cell in a different sheet into a new sheet

    I am using 2 different sheets.
    I want to use into the second one the resulting number from a cell from the first sheet.

    Hi jpmarty,
    If you mean "documents" when you say" sheet" then I can save you some time. No, you cannot reference a cell in a different file or document. There are some people that will write applescripts to do that but they will not work in iOS.
    If both sheets are in the same document:
    Tap "=" in the cell you want the value in, tap the upward arrow that appears to the right, then navigate to the first sheet and click in the cell you want the value from. tap the check.
    quinn

  • How can I insert reference to cell on a different sheet in Numbers beta?

    In Excel or Numbers for iPad, I start typing in a cell, switch to another sheet and click a cell or range, hit enter, and I'm back on the original sheet with the cell reference inserted.  I saw documentation that it works the same way in Numbers Beta on Mac, but it doesn't.  When I leave the sheet, I'm not editing the cell anymore.
    Very frustrating.   This function is often necessary, and long formulas are tedious on iPad.  So far the most reliable method is to export back to Excel, make the change, and re-export to iCloud.

    I struggled with this same issue until this week.  You have to actually type references in cell.  And spacing is the key to making it work.  Make sure to put a space before and after each double colon.
    =SheetName :: B3
    =08 20 14 :: B3
    I you are linking to a different table in a sheet, you have to include the table name also.
    =08 20 14 :: No Shows :: D5

  • Problem clearing GR/IR when PO in currency different to Company currency

    Hi Experts
    I have an issue where I have a PO in say USD where group currency for company is Aus Dollar (AUD)
    At Month end, for whatever reason there is a GR/IR balance and we maintain it with MR11 but MR11 balances the difference in group currency (AUD) where all other postings for the PO are in USD.
    When we run F.13 or F13E the account never clears as it only clears matching transactions of same currency. We seem to never be able to clear the posting created by MR11 (without introducing a large tolerance in F.13 perhaps?)
    Any ideas on a way forward?
    thanks
    AC

    Hi AC,
    Eventhough the P.O is in foreign currency, when you select the Only balances in local currency option, system stores the values only in company code currency. So while clearing you'll not face any issue.
    If not maintain this indicator, then system stores the values in local currency and that foreign currency also, then while clearing you'll face the problem.
    Only balances in local currency setting should activate to GR/IR clearing account
    Rgds
    Murali. N

  • Wrong pricing condition values when using GN_INVOICE_CREATE

    Hi all,
    I am currently handling a program where I have to display all the materials in a given sales area and some corresponding values that depend on pricing conditions. I am using FM GN_INVOICE_CREATE to extract table komv. However, I am experiencing a problem because the values I am getting are different from those in table konv. I am getting the price conditions without the value of field KNUMV.
    I would like to ask if anybody has any idea on how to go about this or maybe another function module that I can use to get the data I need.
    Thanks a lot..
    Regards,
    jac

    Hi,
    Thanks for your reply. I only have the field AUART for checking on the pricing conditions.
    Here is a the part of my code
      CALL FUNCTION 'GN_INVOICE_CREATE'
           EXPORTING
                vbsk_i           = i_vbsk
                id_kvorg        = ''
                id_no_dialog  = c_exis
                invoice_date  = p_datum
                pricing_date  = p_datum
           IMPORTING
                vbsk_e          = i_vbsk
           TABLES
                xkomfk         = i_komfk
                xkomfkgn      = i_komfkgn
                xkomfkko      = i_komfkko
                xkomv          = i_komv
                xthead         = i_thead
                xvbfs           = i_vbfs
                xvbpa          = i_vbpa
                xvbrk           = i_vbrk
                xvbrp           = i_vbrp
                xvbss          = i_vbss
           EXCEPTIONS
                OTHERS       = 1.
    The only parameters in those that have values are c_exis = X, p_datum = given date, and xkomfkgn. The other parameters are all initial when passed to the function module. I get a resulting komv table however, values are incorrect.
    Thanks again for the help..
    Regards,
    jac

  • Firefox should allow users to maintain their zoom setting when switching to a different page, instead of going back to default every time.

    Page text appears very small on laptop while utilizing full resolution on a dell XPS laptop. Zoomed-in a notch or two it looks good. Readable without squinting. But browse to a different page, and its tiny all over again. Firefox, being the best browser on the web, should think about allowing users to maintain their zoom value when going to a different page, instead of going back to default. Just an idea... I know there's alot of laptops out there and if it's hard for me to read with good eyes, I'm sure it's hard for others.

    The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • Problem with Cell size in Excel output of XML report

    Dear all,
    I am facing a problem with cell size when i run my XML report in Excel output. I found that it imitates the cell size of whatever i gave in the RTF. I cannot increase the cell size in RTF as my report contains 60 columns and max width of MS Word table is 22 inches.
    Can any one suggest a way of doing this which shows full data in Excel sheet depending on the column data size with out any word wrap.
    Thanks
    RAJ

    Hi ,
    You can try with
    <xsl:attribute xdofo:ctx="block" name="wrap-option">no-wrap</xsl:attribute>
    may be helpful to you
    Thanks,
    Ananth
    http://bintelligencegroup.wordpress.com/

  • How to synchronize a cell in form with a cell in MS excel sheet

    dear all
    I can successfuly export data to excell using the ole2 package. But the problem is that exporting data from A datablock in a form to Excel sheet is not enough.
    I need to automaticaly copy updates occures on the datablock to its equilivant in the excel sheet. In other words , i need to synchronize my datablock items with facing cells in the excel sheet,so the cells'values in excel sheet automatiacly changes to be the values in the datablock items
    please help

    Dear all
    I can successfuly export data to excell using the ole2 package. But the problem is that exporting data from A datablock in a form to Excel sheet is not enough.
    I need to automaticaly copy updates occures on the datablock to its equilivant in the excel sheet. In other words , I need to synchronize my datablock items with facing cells in the excel sheet,so the cells'values in excel sheet automatiacly changes to be the values in the datablock items
    I searched the web several times . Some people adviced me to use "Apache-jakarta-poi" . It is a pure java code. But my knoledge in java is limited.I asked on Oracle forums -
    how to synchronize a cell in form with a cell in MS excel sheet - but no one can help
    I tried the oracle forms demo "OLEEXCEL.fmb" . But this form is not working correct .
    I need to embed ole2 in my form that holds excel sheet and passes values from text items to the excel sheet.
    My last try is that I did the following :
    1- in the main canvas i insert the OLE2 control
    2- Right Click and choose insert
    3- from the dialog i chosed Excel Sheet
    4- I placed a button on my canvas then i on the button I write this code
    declare
    worksheet ole2.obj_type;
    cell ole2.obj_type;
    args ole2.list_type;
    begin
    forms_ole2.activate_server('block1.excel_sheet');
    worksheet := forms_ole2.get_interface_pointer('block1.excel');
    args := ole2.create_arglist;
    ole2.add_arg(args,1) -- column1
    ole2.add_arg(args,1) -- cell1
    cell := ole2.invoke_obj(worksheet,'cell',args);
    ole2.destroy_arglist(args);
    ole2.set_property('cell','value',:text1);
    ole2.release_obj(cell);
    ole2.release_obj(worksheet);
    end;
    I get this error ora-305500
    and when i debug , the code stop in this line : cell := ole2.invoke_obj(worksheet,'cell',args);
    please help

  • Getting Problem in retrieving values from JTable

    Hi Guys,
    Suppose i clicked in cell in a table to edit it and done some entry in it and without leaving that cell ( means focus is on that cell only) i clicked one button.
    button prints table data on console.
    now problem is the value in focused cell is coming as null or wht i previously return.
    that means unless i m not leaving a cell the Jtable is not taking that value.
    how could i overcome this problem
    thanks in advance

    Use this:table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);The editor will be closed as soon as the table loses focus.

  • How to set setRowKey value when table is populated dynamically

    Hi All
    I have created a view object using only select statement and displaying all the records in it in the table at page load. Table is SelectMany. Now after selecting some records I press submit button. At the backend logic is executed which prints how many rows selected and the values of the selected rows. Everything works fine till here.
    Now when the view object is modified by putting where clause. And the parameter to this where clause is coming from url. When the page is loaded table displays only records based on filter criteria. But the problem begins when I press the submit button. It shows the error: row is null for rowKey:oracle.jbo.Key[AAAQkHAAJAAAACkAAA ]
    I have done some research and found that row key is not set for the displayed records. because at the backend when I am printing the values of keys in selectionState.KeySet it prints only null.
    This thing happens only when table is populated dynamically through url value.
    Can anyone help me how to get the selectionState.Keyset values when table is populated dynamically?

    SOLVED:
    Actually there is no problem with the rowKeys as I mentioned in the post. What happened was that I was executing the query everytime on page load. Second time when the page is loaded the param value was set to null. So row becomes null but on the other hand I am referring the rows by some selected row keys. so the error that row is null for key...
    So now i am storing the param value in managed bean and then referring it in the code.

  • "Problem evaluating a condition" at Receiver Determination

    Hi,
    I've created a complex mail to rfc interface, in which, message is being send as mail attachment  and service inbound interface has multiple operations (each for corresponding rfc).
    at Receiver Determination, rule was created with multiple conditions, in order to determine correct "Communication Component" (multiple receiver agreement and  interface determination were created to supported this "multi interfaces" scenario).
    If no receiver was found message is ignored.
    once in a while, bad non-xml messages (e.g., "asdfasdfasdfffdfdsasdf") are being send,  is this case, while PI is trying to determining the receiver (i.e., evaluate Receiver Determination conditions) exception is being thrown, message is therefor has system error status* (at sxmb_moni) and it can not be ignored (as i wanted it to be).
    how can i workaround this problematic scenario?
    Regards
    Uri
    *Error message (sxmb_moni)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Receiver Determination
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
      <SAP:P1>Problem evaluating a condition: An exception has occurred.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>Error when determining the receiver: Problem evaluating a condition: An exception has occurred. Problem evaluating a condition: An exception has occurred. An exception has occurred. An exception has occurred. An exception has occurred. An exception has occurred. An exception has occurred. Problem extracting values from the Payload: Check line 2 column 1 of the XML document</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Abhishek,
    10x for your replay, but as far as i understand this is exactly the case here.
    conditions are:
    cond1: (/rfc: RFC1 ~ *)
    cond2: (/rfc: RFC2 ~ *)
    this works as expected in cases of xml messages (in case no cond is satisfied) message is ignored. but, in case of non-xml message exception is being thrown while cond is assessed.
    Regards
    Uri

  • Problem getting parameter  values at the service end point

    I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
    I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
    �     Service End Point Definition (in EJB)
    public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
    System.out.println(propertyName);
    System.out.println(PMSCode);
    System.out.println(streetNumPrefix);
    ........ taking printout of all the paramters
    �     This is my WSDL file
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types/>
    <message name="NMServiceServantInterface_setNewAddress">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
    <part name="int_5" type="xsd:int"/>
    <part name="String_6" type="xsd:string"/>
    <part name="int_7" type="xsd:int"/>
    <part name="String_8" type="xsd:string"/>
    <part name="String_9" type="xsd:string"/>
    <part name="String_10" type="xsd:string"/>
    <part name="String_11" type="xsd:string"/>
    <part name="String_12" type="xsd:string"/>
    <part name="String_13" type="xsd:string"/>
    <part name="String_14" type="xsd:string"/>
    <part name="String_15" type="xsd:string"/>
    <part name="String_16" type="xsd:string"/>
    <part name="String_17" type="xsd:string"/>
    <part name="String_18" type="xsd:string"/>
    <part name="int_19" type="xsd:int"/>
    <part name="int_20" type="xsd:int"/>
    <part name="String_21" type="xsd:string"/>
    <part name="String_22" type="xsd:string"/>
    <part name="int_23" type="xsd:int"/>
    <part name="int_24" type="xsd:int"/>
    <part name="String_25" type="xsd:string"/>
    <part name="String_26" type="xsd:string"/>
    <part name="String_27" type="xsd:string"/>
    <part name="int_28" type="xsd:int"/>
    <part name="int_29" type="xsd:int"/>
    <part name="int_30" type="xsd:int"/>
    <part name="String_31" type="xsd:string"/>
    <part name="String_32" type="xsd:string"/>
    <part name="int_33" type="xsd:int"/>
    <part name="int_34" type="xsd:int"/>
    <part name="String_35" type="xsd:string"/></message>
    <message name="NMServiceServantInterface_setNewAddressResponse">
    <part name="result" type="xsd:string"/></message>
    <portType name="NMServiceServantInterface">
    <operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
    <input message="tns:NMServiceServantInterface_setNewAddress"/>
    <output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
    <binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
    <operation name="setNewAddress">
    <input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
    <output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
    <soap:operation soapAction=""/></operation>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
    <service name="NMService">
    <port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
    <soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
    �     I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
    If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
    Thanks

    I just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
    This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy .

  • Problem with offset values

    Hi Experts,
    I have a problem with offset values. I have create a variable on OFISCPER, it's characteristic value, indivdual value, mandatory and ready for the input. I need to show the varibel period and the l previous period and so on till 12 periods. I used the offset values (-1, -2, etc.) but when I execute the query I can show just the variable period and the period previous I don`t see. The query is based on multiprovider and don´t has filters. Can anyone help me?

    Leonel,
    You may nt need to have 12 columns in the query designer.
    You could include the keyfigure and restrict it to the variable and create the offset for the 12 periods
    Check this http://help.sap.com/saphelp_nw04/helpdata/en/00/e8d13f7fb44c21e10000000a1550b0/frameset.htm
    -Doodle

  • Problem with Stock Value Report

    Hi Experts,
    We use MB5B report to see the opening and closing value of stock for the given period.
    Here i am facing one problem that even i am running the report for the same period ( already closed periods) ans same inputs the system gives me some different valus every time i am running .
    I observed that difference between the opening and closing values for every output is constant.
    What could be the reason that system gives such different values when i run MB5B . No backposting is done.
    Regards, B

    Thanks for replying,
    i have mentioned the
    company code, Plants ,
    Selection date,
    in stock type valuated stock,
    in settings selection
    Totals only - Non Hierarchy Display Layout
    Only Matls Handled in Batches ( But Batches w/o stock segment is not checked)
    It is giving me changed values after every 10-15 minutes.
    Regards,
    BB

Maybe you are looking for

  • How to use local variables in control files for loading data

    i want to count the number of records which have odd number like... Data in data.txt 1 a 2 b 3 c So my count = 2, i will write this to another file. Plz help me how to achieve this

  • Adobe Acrobat 9 Pro crashing after 6 sec of startup!

    i installed adobe acrobat and now it is crashing about 6 sec after everytime i open to use it. i have been using it for the past week and it worked fine. i even reinstalled all of it but the problem still exists. i am using a toshiba laptop running w

  • Recyclebin in oracle

    Hi Using Recyclebin(flashback pkg) how many tables/records I can get back after issue the drop/delete commands? Can I get back after a week/month/year ? Are there any limitations on time, data size? Please advise..!! Regards Kpr

  • How to check the integer value with Date Column

    Hi Friends, I have a filter called 'Days'. I need to show the data based on the Days filter (Example : 2 Days). Example Query: Select * from Tb1 Where EndDate(Value as '03/05/2013' > Days ( value as 2) How to handle the above scenario. Thanks in Adva

  • Storing whitespace in db that comes from textarea

    hi guys, i am taking user input from a textarea in a form and saving that in my db. as we all know when one does that the whitespace is sent from the browser to the server but from there on it can get 'lost' in a previous application i built i think