Bug 41415 - HSSFWorkbook getBytes() method removes macro
Summary: HSSFWorkbook getBytes() method removes macro
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-19 08:37 UTC by Michael Guzman
Modified: 2007-01-19 10:17 UTC (History)
0 users



Attachments
Excel file with macro that I use (33.50 KB, application/octet-stream)
2007-01-19 08:43 UTC, Michael Guzman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Guzman 2007-01-19 08:37:04 UTC
I have an existing workbook with a worksheet with a macro that does something.
If I read this workbook into the HSSFWorkbook add some data and call method
workbook.getBytes() to save it to the ServletOutputStream, the macro is lost.
Saving byte array from getBytes() method to the file does not work neither.
However, saving it to the file using workbook.write(FileOutputStream out) works
fine.
Comment 1 Michael Guzman 2007-01-19 08:43:12 UTC
Created attachment 19434 [details]
Excel file with macro that I use
Comment 2 Andy Oliver 2007-01-19 10:17:46 UTC
Ask on the mail list if you're doing it right before posting a potentially
meaningless bug report (we do appreciate meaningful bug reports):

http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html#HSSFWorkbook(org.apache.poi.poifs.filesystem.POIFSFileSystem,%20boolean)