You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Yury Batrakov <ba...@gmail.com> on 2008/03/12 15:13:40 UTC

Macros support in POI

Can I get text of all VB macros embedded in MS Office documents? As
far as I see in source, I can't. Are there any plans to support macros
in POI?

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


Re[2]: Macros support in POI

Posted by Yegor Kozlov <ye...@dinom.ru>.
I tried it some time ago. It didn't work "as is". Evidently some
hacking is required.
I also searched the docs that Microsoft released recently but alas, macros are not described.

Yegor

> On Wed, 12 Mar 2008, Yegor Kozlov wrote:
>> Macros are stored as entries in OLE file system. The problem is that the 
>> body is compressed by LZNT1 algorithm, a weird version of ZIP 
>> compression. As far as I know LZNT1 is a proprietary MS format and not 
>> documented.  So, one of the things to support macros is to implement 
>> LZNT1 decompressor.

> I wonder how close LZNT1 is to the nobbled LZW used in visio. I suspect
> not very, knowing microsoft, but we always have the decoder (and half a
> compressor) for the visio lzw:
> https://svn.apache.org/repos/asf/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java

> Nick

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


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


Re: Macros support in POI

Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 12 Mar 2008, Yegor Kozlov wrote:
> Macros are stored as entries in OLE file system. The problem is that the 
> body is compressed by LZNT1 algorithm, a weird version of ZIP 
> compression. As far as I know LZNT1 is a proprietary MS format and not 
> documented.  So, one of the things to support macros is to implement 
> LZNT1 decompressor.

I wonder how close LZNT1 is to the nobbled LZW used in visio. I suspect 
not very, knowing microsoft, but we always have the decoder (and half a 
compressor) for the visio lzw:
https://svn.apache.org/repos/asf/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/HDGFLZW.java

Nick

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


Re: Macros support in POI

Posted by Yegor Kozlov <ye...@dinom.ru>.
No, we don't support it yet. Actually I do plan to implement it but now sure how
soon.
Macros are stored as entries in OLE file system. The problem is
that the body is compressed by LZNT1 algorithm, a weird version of
ZIP compression. As far as I know LZNT1 is a proprietary MS format and not
documented.  So, one of the things to support macros is to implement LZNT1 decompressor.

Patches are always welcome :)

Yegor

> Can I get text of all VB macros embedded in MS Office documents? As
> far as I see in source, I can't. Are there any plans to support macros
> in POI?

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


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