You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/03/20 09:29:22 UTC

DO NOT REPLY [Bug 52949] How to extract VBA Macros code from Excel file by using POI?

https://issues.apache.org/bugzilla/show_bug.cgi?id=52949

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2012-03-20 08:29:22 UTC ---
Unfortunately POI cannot read macro code. The main difficulty is that VBA isn't
stored as plain text but instead MS Office uses pretty complex format as
described in [MS-OVBA].pdf. 

At minimum, you can grab the node holding VBA code and try to parse it
yourself. The main source of information how to do that is [MS-OVBA].pdf, you
can download it from the Microsoft site.

Both HSSF and XSSF preserve macro nodes, this means that you can create
templates with macros in MS Office and then populates them with data using POI. 

Yegor

-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org