DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17922>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17922

Can't open excel file with both workbook and sheet protected.

           Summary: Can't open excel file with both workbook and sheet
                    protected.
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: HSSF
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I was trying to open the excel file for read-only using POI.The file was both 
workbook and sheet protected. The file couldn't be opened and caused the 
following exception: 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.j
ava:252)
        at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.
java:190)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1
81)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1
53)
        at gov.moh.ohfs.submission.SPSubmissionForm.init(SPSubmissionForm.java:1
05)
        at gov.moh.ohfs.submission.SPSubmission.importSPData(SPSubmission.java:2
52)
        at gov.moh.ohfs.submission.SPSubmission.process(SPSubmission.java:192)
        at gov.moh.ohfs.report.generation.ReportGenController.processFacility(Re
portGenController.java:387)
        at gov.moh.ohfs.report.generation.ReportGenController.main(ReportGenCont
roller.java:621)
Caused by: java.lang.IllegalArgumentException: Illegal length
        at org.apache.poi.util.StringUtil.getFromUnicodeHigh(StringUtil.java:112
)
        at org.apache.poi.hssf.record.FontRecord.fillFields(FontRecord.java:172)

        at org.apache.poi.hssf.record.Record.fillFields(Record.java:143)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:105)
        at org.apache.poi.hssf.record.FontRecord.<init>(FontRecord.java:125)
        ... 13 more
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record ins
tance, the following exception occured: null
        at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.j
ava:265)
        at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.
java:190)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1
81)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1
53)
        at gov.moh.ohfs.submission.SPSubmissionForm.init(SPSubmissionForm.java:1
05)
        at gov.moh.ohfs.submission.SPSubmission.importSPData(SPSubmission.java:2
52)
        at gov.moh.ohfs.submission.SPSubmission.process(SPSubmission.java:192)
        at gov.moh.ohfs.report.generation.ReportGenController.processFacility(Re
portGenController.java:387)
        at gov.moh.ohfs.report.generation.ReportGenController.main(ReportGenCont
roller.java:621)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to