This project is read-only.

Duplicate PageSettingsBlock record (sid=0x12)

Apr 1, 2011 at 1:21 PM
Edited Apr 1, 2011 at 1:23 PM

Good morning,

I am processing a number of spreadsheets, all of which are similar in layout. However, on 2 sheets out of about 50, I am receiving the above message. This message occurs as soon as I try to attach the filestream to the HSSFWorkbook object; the same process works in all other cases and is very similar to the examples provided. I've been going through the source code for NPOI and also been looking through the POI info on Apache's forums but haven't narrowed down where I need to look. Unfortunately, the spreadsheets contain sensitive information so I can't post one as a sample. I have tried to re-create this issue using similar formulas, etc., but haven't had any luck. Can anyone provide an idea of exactly what this message might be pointing to? The only sid that I found in the system referencing 0x12 is for the Unary Plus section of code.

Thanks for any suggestions!

Apr 1, 2011 at 2:07 PM

Apparently, this is something that was fixed in the code changes since the 1.2.3 release. I downloaded the source from SVN and compiled the DLL from scratch and the spreadsheets in question worked flawlessly! Now to continue testing to make sure all the functions that we need work properly.

Apr 1, 2011 at 6:48 PM

This is a bug involved from POI 3.7. I've fixed it in the latest changeset and this fix will be released with NPOI 1.2.4.

Apr 1, 2011 at 7:45 PM
Edited Apr 1, 2011 at 7:46 PM

Thanks for the update. I thought maybe it was corrected as part of another change, but I never found that particular SID. I did see that POI had corrected some issues that seemed to be related. After compiling from the latest source, the library seems to work very well.

Great project!

Jun 3, 2011 at 10:52 AM

I had the exact same issue with the 1.2.3 release.

I just tested with the alpha 1.2.4, and the bug is fixed !

Thanks for your awesome work !