The error is still persist.
I have taken the lates build and jars from trunk (15/04/2009) and I have
check with .xlsx format also. the same exception is throwing as metioned
above.:working::working:
Please recheck the same.
I have written the testcase in TestExcelExtractor.java
Testcase :
public void testImportMacroXLSM() throws Exception {
String filename =
"C:\\poi-src-3.5-beta5-20090219\\poi-3.5-beta5\\test.xlsx";
InputStream macro = new FileInputStream(filename);
String file = "test1.xlsx";
//POIFSFileSystem poiFileStream = new POIFSFileSystem(macro);
Workbook _workBook = new XSSFWorkbook(Package.open(macro));
_workBook.removeSheetAt(0);
_workBook.createSheet("1.
test2").createRow(1).createCell(1).setCellValue("test");
FileOutputStream out = new FileOutputStream("c:/"+file);
_workBook.write(out);
out.close();
}
public void testImportMacroXLS() throws Exception {
String filename =
"C:\\poi-src-3.5-beta5-20090219\\poi-3.5-beta5\\test.xls";
InputStream macro = new FileInputStream(filename);
String file = "test1.xls";
//POIFSFileSystem poiFileStream = new POIFSFileSystem(macro);
Workbook _workBook = new HSSFWorkbook(macro);
_workBook.removeSheetAt(0);
_workBook.createSheet("1.
test2").createRow(1).createCell(1).setCellValue("test");
FileOutputStream out = new FileOutputStream("c:/"+file);
_workBook.write(out);
out.close();
}
Please let me if you resolve this.
--
View this message in context:
http://www.nabble.com/Getting-error-while-creating-a-worksheet-using-XSSFWorkbook-class%28APACHE-3.5-beta-4%29-tp22822952p23076309.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]