https://issues.apache.org/bugzilla/show_bug.cgi?id=50833
Summary: workbook.write(outputstream) corrupts cell comments
for protected workbooks
Product: POI
Version: 3.7
Platform: PC
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=26695)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26695)
sample xls workbook to use with code provided in description
If you have a workbook that is protected and you open the it and write it to an
output stream, all comments in the workbook end up corrupted.
Attached is a sample workbook (protected password is "password") to use with
the following code:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class CommentTest {
public static void main(String[] args) throws Exception {
File file = new File("Book1.xls");
FileInputStream fileInputStream = new FileInputStream(file);
HSSFWorkbook workbook = new HSSFWorkbook(fileInputStream);
workbook.write(new FileOutputStream(new File("Book1_copy.xls")));
}
}
--
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]