Bug 58036

Summary: [PATCH] XSSFWorkbook.setVBAProject()
Product: POI Reporter: Chris Boyle <cmb-apache>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: dtn-asfbugs
Priority: P2 Keywords: PatchAvailable
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to add XSSFWorkbook.setVBAProject()

Description Chris Boyle 2015-06-15 11:27:51 UTC
Created attachment 32822 [details]
Patch to add XSSFWorkbook.setVBAProject()

POI doesn't handle the binary format of VBA macros within an XSSF workbook, which is fair enough, but if you already have the bytes of such a macro file on hand, for example from an existing workbook, it would be nice if POI made it easy to insert those macros into a new workbook. The attached patch provides two new methods to address this.

  XSSFWorkbook.setVBAProject(InputStream vbaProjectStream)

  XSSFWorkbook.setVBAProject(XSSFWorkbook macroWorkbook)
  (convenience helper to obtain the stream from an existing workbook)
Comment 1 David North 2015-07-13 09:05:32 UTC
Patch applied. Fixed in r1690593