Package org.apache.poi.poifs.macros
Class VBAMacroExtractor
java.lang.Object
org.apache.poi.poifs.macros.VBAMacroExtractor
This tool extracts out the source of all VBA Modules of an office file,
both OOXML (eg XLSM) and OLE2/POIFS (eg DOC), to STDOUT or a directory.
- Since:
- 3.15-beta2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExtracts the VBA modules from a macro-enabled office file and writes them to.vbafiles inoutputDir.voidExtracts the VBA modules from a macro-enabled office file and writes them to files inoutputDir.static void
-
Constructor Details
-
VBAMacroExtractor
public VBAMacroExtractor()
-
-
Method Details
-
main
- Throws:
IOException
-
extract
Extracts the VBA modules from a macro-enabled office file and writes them to files inoutputDir. Creates theoutputDir, directory, including any necessary but nonexistent parent directories, ifoutputDirdoes not exist. IfoutputDiris null, writes the contents to standard out instead.- Parameters:
input- the macro-enabled office file.outputDir- the directory to write the extracted VBA modules to.extension- file extension of the extracted VBA modules- Throws:
IOException- Since:
- 3.15-beta2
-
extract
Extracts the VBA modules from a macro-enabled office file and writes them to.vbafiles inoutputDir. Creates theoutputDir, directory, including any necessary but nonexistent parent directories, ifoutputDirdoes not exist. IfoutputDiris null, writes the contents to standard out instead.- Parameters:
input- the macro-enabled office file.outputDir- the directory to write the extracted VBA modules to.- Throws:
IOException- Since:
- 3.15-beta2
-