Thomas Herre wrote:

I tested your sheet with POI 2.51.


thanks!

It has indeed the old shared formula problem I referred to last time.


Are you sure it's the same issue? I have tested with the latest version of POI I could find (poi-3.0-alpha1-20050704.jar), and this problem is not soved there.

Try this: remove the formulae that cause the problem (edit, delete, formula).
Retype the formulae and I mean type each of them, don't drag and drop,
as this causes Excel to create the shared formula. Do not not save
the Workbook until you're done. Rerun your program, it should not
bring up the errors. Open the Workbook in Excel again and save it.
Run your program -> errors come up as Excel created the shared formulae
when saving the workbook.

For 2.5.1 this is my workaround when I encounter such problems.
Of cause you can also apply this with the help of a simple class that types
the formulae for you using POI :-)


Of couse that works, and it also works if I delete a line or a column before, but many people will upload their own spreadsheets, I can't tell 1/3 of them to send my their workbooks! If I can't rely on reading formulas, I cannot use this feature or must switch to another library like jexcelapi. And from testing, latest stable version of jexeclapi can read all my spreadsheets, which POI HSSF cannot read (because of the shared formula issue, does not work with latest stable version of POI, and not with latest alpha version)! Aside from that jexeclapi could solve my two other mentioned problems too.

My hope was that this is fixed in 3.0. Can anybody confirm it is not?


perhaps in CVS, but not in poi-3.0-alpha1-20050704.jar.

best regards
Andreas


I filed a bug for this issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=36941

I think it's another issue than Thomas link.

Igor, perhaps you could add an Excel example as simple as possible to the bug - which shows the problem?

I don't know a solution, so this problem and the two other issues I posted to this list without response:

- I don't know how to find out the RGB-color from a color-index read by HSSFStyle.getFillBackgroundColor()
  http://thread.gmane.org/gmane.comp.jakarta.poi.user/7102

- I don't know how to add a PNG image with 100% size (pixels)
  http://thread.gmane.org/gmane.comp.jakarta.poi.user/7088

will probably force me to use http://jexcelapi.sourceforge.net/.

I'm not very happy with that, because I like POI very much.
But at the moment I'm rewriting my code to use jexcelapi, it solves all three mentioned issues for me.

To test if your formulas work with jexcelapi, you can check it easily this way:

java -jar jxl.jar -formulas spreadsheet.xls

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/

Reply via email to