Hi,
I am using the following code to transfor the data to
org.apache.poi.ss.usermodel.Workbook.
The transformation was sucessful but after that i am not able to write to
the file .xlsx file.
/////// piece of code ///////////
XLSTransformer transformer = new XLSTransformer();
org.apache.poi.ss.usermodel.Workbook wb = null;
InputStream inputStream =
this.getClass().getResourceAsStream("/template/RootPlot_MacroTemplate.xls");
wb = transformer.transformXLS(inputStream, map);
File file = new File("C:\\RootPlot\\Temp\\RPTReport.xlsx");
file.deleteOnExit();
FileOutputStream fileOutputStream = new FileOutputStream(file);
wb.write(fileOutputStream);
fileOutputStream.flush();
fileOutputStream.close();
after write to the file, the file is changing as correpted one as i am not
able to open it.
If i use ".xls" file instead of ".xlsx" file, the data writing was
successful but i am getting macro errors as my Office is updated recently
with 2007.
Please suggest approach.
Thanks in advance,
Srinivasa Rao.
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/How-to-copy-data-from-Workbook-to-XSSFWorkbook-tp3280010p3280010.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]