https://issues.apache.org/bugzilla/show_bug.cgi?id=47553
Summary: shiftRows() produce a corrupted xls file
Product: POI
Version: 3.2-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=24011)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24011)
Template
Hi,
I prove this code and the result is a corrupted xls file.
HSSFWorkbook wb=null;
File plantilla = new File("/plantillas/PlantillaPrueba.xls");
try {
FileInputStream is=new FileInputStream(plantilla);
wb = new HSSFWorkbook(is);
HSSFSheet hoja = wb.getSheetAt(1);
int i = 11;
int j = hoja.getLastRowNum();
int num = 10;
hoja.shiftRows(i, j, num);
File resp = new File("/plantillas/prueba.xls");
OutputStream fileOut = new FileOutputStream(resp);
wb.write(fileOut);
fileOut.flush();
fileOut.close();
is.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I think that the problem ocurred when shiftrows is called, because when I
comment this line the xls is obtained well formed.
In the attachment file you can ontain the template file use for the example.
thanks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]