You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andrey Yesyev <an...@gmail.com> on 2012/06/19 18:08:22 UTC

Re: DO NOT REPLY [Bug 52949] How to extract VBA Macros code from Excel file by using POI?

Yegor,

I have implemented macro extraction from XLS and DOC files.
Want to add it to XLSX and DOCX files.

How can I contribute these changes?

Regards,
Andrey!


On 28 April 2012 08:30, Nick Burch-11 [via Apache POI] <
ml-node+s1045710n5672539h82@n5.nabble.com> wrote:

> On Sat, 28 Apr 2012, Yegor Kozlov wrote:
> > All I can suggest is to study the spec and write a decoder of VBA. I
> > recall that macro code is compressed but it is not PKZIP but some other
> > compression algorithm.
>
> I think it might well be a tweaked LZW. We already have two LZW
> implementations handled in POI, as some formats use the flag bit one way,
> some the other... See org.apache.poi.util.LZWDecompresser. You may need
> some trial + error and/or looking at hex dumps with known text to work out
> what the options used for VBA are.
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5672539&i=0>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5672539&i=1>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5672539.html
>  To unsubscribe from DO NOT REPLY [Bug 52949] New: How to extract VBA
> Macros code from Excel file by using POI?, click here<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5579175&code=YW5kcmV5Lnllc3lldkBnbWFpbC5jb218NTU3OTE3NXwyNDA3NTQzMw==>
> .
> NAML<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5710243.html
Sent from the POI - Dev mailing list archive at Nabble.com.

Re: DO NOT REPLY [Bug 52949] How to extract VBA Macros code from Excel file by using POI?

Posted by Andrey Yesyev <an...@gmail.com>.
Forgot to add diff file.
Here it is. patch.zip
<http://apache-poi.1045710.n5.nabble.com/file/n5712308/patch.zip>  



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5712308.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: DO NOT REPLY [Bug 52949] How to extract VBA Macros code from Excel file by using POI?

Posted by Andrey Yesyev <an...@gmail.com>.
Sorry guys, it takes me so long...
Here is the patch for macro extraction, hope it'll be useful..

patch.tar.gz
<http://apache-poi.1045710.n5.nabble.com/file/n5712300/patch.tar.gz>  



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5712300.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: DO NOT REPLY [Bug 52949] How to extract VBA Macros code from Excel file by using POI?

Posted by Yegor Kozlov <ye...@dinom.ru>.
Great! Can you create a patch in the "svn diff" format and upload it
in Bugzilla? You can re-open Bug 52949 or create a new one.

Basic contribution guidance can be found here:
http://poi.apache.org/guidelines.html

Yegor

On Tue, Jun 19, 2012 at 8:08 PM, Andrey Yesyev <an...@gmail.com> wrote:
> Yegor,
>
> I have implemented macro extraction from XLS and DOC files.
> Want to add it to XLSX and DOCX files.
>
> How can I contribute these changes?
>
> Regards,
> Andrey!
>
>
> On 28 April 2012 08:30, Nick Burch-11 [via Apache POI] <
> ml-node+s1045710n5672539h82@n5.nabble.com> wrote:
>
>> On Sat, 28 Apr 2012, Yegor Kozlov wrote:
>> > All I can suggest is to study the spec and write a decoder of VBA. I
>> > recall that macro code is compressed but it is not PKZIP but some other
>> > compression algorithm.
>>
>> I think it might well be a tweaked LZW. We already have two LZW
>> implementations handled in POI, as some formats use the flag bit one way,
>> some the other... See org.apache.poi.util.LZWDecompresser. You may need
>> some trial + error and/or looking at hex dumps with known text to work out
>> what the options used for VBA are.
>>
>> Nick
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5672539&i=0>
>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5672539&i=1>
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5672539.html
>>  To unsubscribe from DO NOT REPLY [Bug 52949] New: How to extract VBA
>> Macros code from Excel file by using POI?, click here<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5579175&code=YW5kcmV5Lnllc3lldkBnbWFpbC5jb218NTU3OTE3NXwyNDA3NTQzMw==>
>> .
>> NAML<http://apache-poi.1045710.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52949-New-How-to-extract-VBA-Macros-code-from-Excel-file-by-using-POI-tp5579175p5710243.html
> Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org