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=18311>.
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=18311

Writing Formula to Excel workbook - mutliple paste formula

           Summary: Writing Formula to Excel workbook - mutliple paste
                    formula
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I think this bug is related to 15223 but I am logging it again because I think 
I have a bit more detail.
This appears to be one of those obscure bugs that only appears under certain 
circumstances.

I am reading an existing Excel workbook (excel.xls), amending some values 
(omitted from the test case) and writing out the resultant workbook (poi.xls).
In Excel creating the original workbook, I have entered two rows of numbers.
I have also defined a summation row. I declare a formula for a cell, copy it 
then :-
1)  paste it individually to any number of subsequent cells across a row
        the workbook is written out correctly
2)  paste it simultaneously to up to 5 subsequent cells in the row
        the workbook is written out correctly
3)  paste it simultaneously to more than 5 subsequent cells in the row
        the original formula cell is OK but the others have #REF! error
        and when the workbook is opened in Excel you get the error
            "File error: data may have been lost."

Test Case
---------
        String filename = "Excel.xls" ;
        FileInputStream  fis = new FileInputStream( filename );
        POIFSFileSystem  fs  = new POIFSFileSystem( fis );
        HSSFWorkbook     wb  = new HSSFWorkbook( fs );

        FileOutputStream fos = new FileOutputStream( "Poi.xls" );
        wb.write( fos );
        fos.close();

Environment
-----------
POI   : jakarta-poi-1.11.0-dev-20030324.jar
Java  : 1.4.1 b21
Excel : 2002 SP-2
OS    : XP 5.1.2600

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

Reply via email to