public class VBAMacroReader extends Object implements Closeable
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!
| Constructor and Description |
|---|
VBAMacroReader(File file) |
VBAMacroReader(InputStream rstream) |
VBAMacroReader(POIFSFileSystem fs) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,Module> |
readMacroModules() |
Map<String,String> |
readMacros()
Reads all macros from all modules of the opened office file.
|
public VBAMacroReader(InputStream rstream) throws IOException
IOExceptionpublic VBAMacroReader(File file) throws IOException
IOExceptionpublic VBAMacroReader(POIFSFileSystem fs)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Map<String,Module> readMacroModules() throws IOException
IOExceptionpublic Map<String,String> readMacros() throws IOException
IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved