https://issues.apache.org/bugzilla/show_bug.cgi?id=52300
Bug #: 52300
Summary: Corrupted File after sheetCopy()
Product: POI
Version: 3.8-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 28048
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28048
Template File
Hi,
Iam using templateFiles (*.xlt) and want to copy some sheets to reuse them.
The template files contains a image.
But during the copy progress I got the following error:
WARNING: 8 bytes remaining but no space left
When I want to open the new file afterwards I got a Errormessage and Excel
repairs it.
After that the file is open and still looks good (Image is on both sheets).
I attached the template file and a litte Testprogram.
public class POITemplateCopyTest {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
InputStream is = new FileInputStream(new
File("D:\\BugReport\\SourceTemplate.xlt"));
POIFSFileSystem poifs = new POIFSFileSystem(is);
HSSFWorkbook wb = new HSSFWorkbook(poifs);
is.close();
wb.cloneSheet(1);
wb.write(new FileOutputStream(new
File("D:\\BugReport\\TemplateTestCopy.xls")));
System.out.println("Done");
}
}
--
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]