can you attach the supporting information into bugzilla?

2.5 introduced drawing object support and may have affected the interpretation of the file. so if u can also verify if this is an issue in 2.0 that would help narrow it down.


Bret Gregory wrote:
I am new to POI and am running into some problems trying to create a new
report using a template in POI 2.5.
I found a similar problem being reported in POI 2.0 but the bug report said
that it was resolved.


Basically, I have a test case that attempts to modify one cell in the new
worksheet.  When I attempt to open the newly created file it gives me an
error that Microsoft attempted to repair the file.  Here is a copy of the
log:


Errors were detected in file 'C:\API_RECON\test_data\excel_manipulation_test.xls' The following is a list of repairs:

        Damage to the file was so extensive that repairs were not possible.
Excel attempted to recover your formulas and values, but        some data
may have been lost or corrupted.

The file opens, but all the formatting is gone and the image is not
displayed.
Is anyone else having this problem? Any help is much appreciated.



Here is my test code:

public ExcelTest() {
try {
FileInputStream file = new
FileInputStream("C:\\API_RECON\\test_data\\Reconciliation_Report_Template.xl
t");
HSSFWorkbook wb = new HSSFWorkbook(file, true);
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow title_row = sheet.getRow(3);
HSSFCell title_cell = title_row.getCell((short)0);
title_cell.setCellValue("TEST TEST TEST");
FileOutputStream out = new
FileOutputStream("C:\\API_RECON\\test_data\\excel_manipulation_test.xls");
wb.write(out); out.close();


} catch (FileNotFoundException fnf) {
fnf.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
} }
public static void main(String[] args) {
new ExcelTest();
}







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

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



Reply via email to