Thomas Herre wrote:

1) Didn't check it but I think both methods start with index 0. There might be indeed a column 3 with all cells being blank?


no, I'm pretty sure! It's strange.
I saw this issue with every xls file I tried. So I created a completley new one from scratch only containing the 9 cells mentioned below.

HSSFSheet.getFirstRowNum()  returns "0"
HSSFRow.getFirstCellNum() returns "0" too?!

So getFirstCellNum() and getLastCellNum() do not fit together!

I attatched the Excel File. It has nothing to do with an index of a loop or something like that, I used such a code:

POIFSFileSystem fs      =
       new POIFSFileSystem(new FileInputStream("cr_test.xls"));
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
// sheet.getLastRowNum();
HSSFRow row = sheet.getRow(0);
// row.getLastCellNum();

2) The error message you've seen is related to the shared formula problem. See: http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200406.mbox/[EMAIL PROTECTED]


Ah, thank you.
So there is a patch for 3.0? I used: poi-3.0-alpha1-20050704.jar

So it's not included here?
Where can I get the patch or better working poi.jar from?

The posting is more than 1 year old - so the patch seems to exist for more than one year - hasn't there been any progress to accept the patch?

btw.: I used 3.0 because in 2.0 there is no support for adding images. Or is poi-3.0-alpha1-20050704 really not reliable yet?


best regards
Andreas


I have a sheet like:

A1    B1    C1
A2    B2    C2
A3    B3    C3

When I use: HSSFSheet.getLastRowNum()

it returns "2" - so it starts counting rows from 0 = first row.

When I use: HSSFRow.getLastCellNum()

it returns "3" for every row, so it seems to start counting from 1 = first col.

Why  is there a different behaviour?
And why this way?
Perhaps the other way around I could understand it...

And another issue (another, more complex workbook), I try to read formulas using

HSSFCell.getCellFormula()

which works nice, but in one Excel-Sheet I have a column with a lot of formulas like:

=C61*F61

And some of these really simple formulas can't be displayed (problems only in row 60-65?!?!). The output of HSSFCell.getCellFormula() is:

NO IDEA SHARED FORMULA EXP PTG

what's that?
What could be the problem?
The excel sheet is not really big or complex. If I copy all the cells to another sheet the problem is still there.

best regards
Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




Hi!

Attachment: cr_test.xls
Description: application/msexcell

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to