You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2004/06/03 12:46:21 UTC

DO NOT REPLY [Bug 29357] New: - Code generates unreadable xls files after upgrade to POI_2.5

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=29357

Code generates unreadable xls files after upgrade to POI_2.5

           Summary: Code generates unreadable xls files after upgrade to
                    POI_2.5
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: timw@mediatel.co.uk


I have been writing an Excel file generator that takes a template xls file and
modifies it to insert data. I have successfully been creating xls files working
with the 2.0 release but after I upgraded to the 2.5 release although the code
still executes without error but the xls that is generated can not be read by MS
Excel or Open Office.

I've been talking on the forum about this and various people have mentioned the
 Escher layer but even using templates that do not contain graphics still do not
work.

When I tried to examine the 2.5 generated file with the biff viewer it errored
with the message:

[WARNING] Unknown Ptg 0 (0)
[WARNING] Unknown Ptg 0 (0)
[WARNING] Unknown Ptg 0 (0)
java.lang.NegativeArraySizeException
       at
org.apache.poi.hssf.dev.BiffViewer.createRecords(BiffViewer.java:147)
       at org.apache.poi.hssf.dev.BiffViewer.run(BiffViewer.java:110)
       at org.apache.poi.hssf.dev.BiffViewer.main(BiffViewer.java:693)/

(I get the "[WARNING] Unknown Ptg 0 (0)/" messages with the 2.0 file as well so
I don't think they have anything to with the problem.)


During the development of my code I have had to make a small change to the POI
releases I have used. I'm pretty sure the changes I've made are not relevant to
this problem but for my code to successfully execute it requires my modified
version of the POI API. 

The changes I have made are just to make the following classes implement the
"java.io.Serializable" class:

org.apache.poi.hssf.usermodel.HSSFCell
org.apache.poi.hssf.usermodel.HSSFCellStyle
org.apache.poi.hssf.record.Record 

(I've already submitted a bug report to include these changes in the next
standard release bugzill id 27333)

I'll attach the following files to this bug report:

POI_2.0(tim).jar (my modified version of the POI 2.0 release);
POI_2.5(tim).jar (my modified version of the POI 2.5 release);
CMSExcelGenerator.jar (the binaries of all my own required classes);
ClientPlanGenerator.java (the source code of my main class that manipulates the
xls template);
AllEncompassPlan.xls (my template excel file, no images, no macros!);
ClientPlanGenerator.properties (my log4j config file);
log4j-1.2.8.jar (log4j jar);

Please feel free to contact me if you need any other files (think they are all
you need) or to ask any questions regarding my code.

Many Thanks,

Tim Wilkins

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org