.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "EXTRACT_VBA 1p" .TH EXTRACT_VBA 1p "2019-02-25" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" extract_vba \- A utility to extract a VBA project from an Excel 2007+ xlsm file. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This utility is used to extract the \s-1VBA\s0 project binary from an Excel 2007+ xlsm file. The \s-1VBA\s0 project can then be added to an Excel::Writer::XLSX file to enable it to have macros. .PP An \f(CW\*(C`xlsm\*(C'\fR file is a version of an Excel \f(CW\*(C`xlsx\*(C'\fR file that contains an additional \s-1VBA\s0 project binary file. The \f(CW\*(C`xlsm\*(C'\fR file format is a collection of mainly \s-1XML\s0 files in a \s-1ZIP\s0 container. .PP The extracted \s-1VBA\s0 project is an \s-1OLE\s0 Compound Document in binary format. It is named \f(CW\*(C`vbaProject.bin\*(C'\fR and is generally located in the \f(CW\*(C`xl\*(C'\fR directory of the \f(CW\*(C`xlsm\*(C'\fR file. .PP See the \f(CW\*(C`add_vba_project()\*(C'\fR section of the Excel::Writer::XLSX documentation for more details. .PP Note: you can also extract the \s-1VBA\s0 project from an \f(CW\*(C`xlsm\*(C'\fR file using the standard Linux \f(CW\*(C`unzip\*(C'\fR command: .PP .Vb 1 \& unzip \-j macro01.xlsm xl/vbaProject.bin .Ve .PP On Windows you can use any suitable Unzip application. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& $ extract_vba file.xlsm \& Extracted \*(AqvbaProject.bin\*(Aq successfully \& \& $ extract_vba \-h # For help. .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-help or \-h\fR" 4 .IX Item "--help or -h" Print the help documentation. .SH "AUTHOR" .IX Header "AUTHOR" John McNamara jmcnamara@cpan.org .SH "VERSION" .IX Header "VERSION" Version 0.01. .SH "COPYRIGHT" .IX Header "COPYRIGHT" (c) \s-1MMXV,\s0 John McNamara. .PP All Rights Reserved. This program is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.