Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.poifs.macros
Class VBAMacroExtractor

    java.lang.Object
      org.apache.poi.poifs.macros.VBAMacroExtractor

    public class VBAMacroExtractor

extends java.lang.Object

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
`VBAMacroExtractor()`

Method Summary
`void` | `extract(java.io.File input, java.io.File outputDir)` Extracts the VBA modules from a macro-enabled office file and writes them to `.vba` files in `outputDir`.
`void` | `extract(java.io.File input, java.io.File outputDir, java.lang.String extension)` Extracts the VBA modules from a macro-enabled office file and writes them to files in `outputDir`.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### VBAMacroExtractor

    public VBAMacroExtractor()

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### extract

    public void extract(java.io.File input,
                        java.io.File outputDir,
                        java.lang.String extension)
                 throws java.io.IOException

  Extracts the VBA modules from a macro-enabled office file and writes them to files in `outputDir`. Creates the `outputDir`, directory, including any necessary but nonexistent parent directories, if `outputDir` does not exist. If `outputDir` is 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:
    `java.io.IOException`
  Since:
    3.15-beta2

### extract

    public void extract(java.io.File input,
                        java.io.File outputDir)
                 throws java.io.IOException

  Extracts the VBA modules from a macro-enabled office file and writes them to `.vba` files in `outputDir`. Creates the `outputDir`, directory, including any necessary but nonexistent parent directories, if `outputDir` does not exist. If `outputDir` is 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:
    `java.io.IOException`
  Since:
    3.15-beta2

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.