Bug 46711 - java.lang.RuntimeException when trying to read a sheet having protected cells
Summary: java.lang.RuntimeException when trying to read a sheet having protected cells
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows Server 2003
: P2 regression (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 20:08 UTC by Vinu Kumar
Modified: 2009-03-12 00:06 UTC (History)
0 users



Attachments
Repro file for the issue (94.00 KB, application/vnd.ms-excel)
2009-02-12 20:08 UTC, Vinu Kumar
Details
Original file created in old version of Office (46.50 KB, application/octet-stream)
2009-03-11 00:27 UTC, Tomas Prochazka
Details
File which was edited and saved in Office 2007 with compatibility mode (50.00 KB, application/vnd.ms-excel)
2009-03-11 00:28 UTC, Tomas Prochazka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vinu Kumar 2009-02-12 20:08:50 UTC
Created attachment 23254 [details]
Repro file for the issue

Trying to read a xls with protected cells give the following exception:

java.lang.RuntimeException: two Page Settings Blocks found in the same sheet
        at org.apache.poi.hssf.model.Sheet.<init>(Sheet.java:228)
        at org.apache.poi.hssf.model.Sheet.createSheet(Sheet.java:160)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:287)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:201)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:317)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
        at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:59)

Tested with the latest trunk
Comment 1 Vinu Kumar 2009-02-18 09:45:54 UTC
The sheet had some views specific to some users.
Comment 2 Tomas Prochazka 2009-03-11 00:23:19 UTC
I have .XLS file which I can normally open by POI library. I open it in Office 2007, edit same values in table and save it. And now I get the same exception from POI. I really think, that this is big problem. .XLS files which was edited in Office 2007 can't be open be POI library.

It's really invalid bug report? It's bug in Office 2007?
Comment 3 Tomas Prochazka 2009-03-11 00:27:30 UTC
Created attachment 23368 [details]
Original file created in old version of Office
Comment 4 Tomas Prochazka 2009-03-11 00:28:14 UTC
Created attachment 23369 [details]
File which was edited and saved in Office 2007 with compatibility mode
Comment 5 David Fisher 2009-03-11 23:29:01 UTC
Tomas,

The person that submitted this bug - Vinu - was the one who resolved it as invalid. I think that he had information in the file which should not be shared.

Rather than re-opening another issue, you really should submit a new bug. For instance you say your file was edited in Office 2007 and saved in compatibility mode. I wonder if you have applied every update to your copy of Office 2007? How did you edit the file?

Do you get exactly the same error.

Regards,
Dave
Comment 6 Tomas Prochazka 2009-03-12 00:06:09 UTC
(In reply to comment #5)
Ok. I entered new issue #46840