You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pierre Lavignotte <pi...@gmail.com> on 2009/01/21 18:11:14 UTC

Possible bug on HSSFWorkbook read

Hi all,

On opening a very simple workbook like this :

            InputStream in = new FileInputStream(path + fileName + ".xls");

            HSSFWorkbook workbook = new HSSFWorkbook(in);

I get the following exception :
org.apache.poi.hssf.record.RecordFormatException: String record was
supplied but formula record flag is not  set
    at
org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate.<init>(FormulaRecordAggregate.java:51)
    at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct(ValueRecordsAggregate.java:159)
    at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:89)
    at org.apache.poi.hssf.model.Sheet.<init>(Sheet.java:199)
    at org.apache.poi.hssf.model.Sheet.createSheet(Sheet.java:161)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:282)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:196)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:312)
    at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:293)
    at com.zoltar.poi.ExcelTransform.main(ExcelTransform.java:187)


The workbook is a workbook originally produced by Excel 2003, modified with
POI 3.2 FINAL and saved back to disk.
After that, it's impossible to read it again.

Is it a known bug ?

Thank you,
Pierre

Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com

Re: Possible bug on HSSFWorkbook read

Posted by Pierre Lavignotte <pi...@gmail.com>.
Thank you Josh.

I'm not sure I will be authorized to use a beta version in production but
I'll give it a try.

Pierre

Cordialement,
Pierre Lavignotte
Ingénieur Conception & Développement
http://pierre.lavignotte.googlepages.com


On Wed, Jan 21, 2009 at 8:13 PM, Josh Micich <jo...@gmail.com> wrote:

> Hello Pierre,
>
> I think this bug has already been fixed:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46213
>
> BTW, it's sometimes very useful google your error message:
> http://www.google.com/search?hl=en&q=POI+"String+record+was"
>
> The fix is available from version 3.5-beta4 onwards.
>
> regards,
> Josh
>

Re: Possible bug on HSSFWorkbook read

Posted by Josh Micich <jo...@gmail.com>.
Hello Pierre,

I think this bug has already been fixed:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46213

BTW, it's sometimes very useful google your error message:
http://www.google.com/search?hl=en&q=POI+"String+record+was"

The fix is available from version 3.5-beta4 onwards.

regards,
Josh