Package org.apache.poi.poifs.macros
Class VBAMacroReader
java.lang.Object
org.apache.poi.poifs.macros.VBAMacroReader
- All Implemented Interfaces:
Closeable,AutoCloseable
Finds all VBA Macros in an office file (OLE2/POIFS and OOXML/OPC), and returns them.
NOTE: This does not read macros from .ppt files. See org.apache.poi.hslf.usermodel.TestBugs.getMacrosFromHSLF() in the scratchpad module for an example of how to do this. Patches that make macro extraction from .ppt more elegant are welcomed!
- Since:
- 3.15-beta2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Reads all macros from all modules of the opened office file.
-
Constructor Details
-
VBAMacroReader
- Throws:
IOException
-
VBAMacroReader
- Throws:
IOException
-
VBAMacroReader
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
readMacroModules
- Throws:
IOException
-
readMacros
Reads all macros from all modules of the opened office file.- Returns:
- All the macros and their contents
- Throws:
IOException- Since:
- 3.15-beta2
-