You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by fa...@favroweb.com on 2005/02/11 18:30:57 UTC
Writing VBA macros with POI
I have an unusual request to be able to include a standard macro in dynamically
generated Excel files that I stream from a J2EE application.
Is it possible to either:
1) Create the file dynamically with POI and add in macro code at runtime?
Or
2) Perhaps have a static template xls file with the macro code already in it
which I would then copy into memory using POI (assuming POI doesn't damage or
alter the macro code) and then manipulate the cells with the data that I then
stream to the user for download?
Thanks for any input.
Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: AW: Writing VBA macros with POI
Posted by Maria Lidia Campo <ml...@yahoo.com>.
Hi Brett...
Once I had your problem.. and I think you should, in order to preserve the existing macros at the template you are opening, execute the following when opening the excel...
InputStream is = ...
POIFSFileSystem fs =new POIFSFileSystem(is);
HSSFWorkbook wb = new HSSFWorkbook(fs, true);
It is important the true value in order to keep the macros....
Regards,
Maria Lidia
"KHZ (SAW)" <ka...@sawag.com> wrote:
Hi Brett.
2) is surely possible. The macro code from the template isn't lost.
1) wasn't possible some months ago and I don't think that this has
changed up to yet.
Regards, Karl-Heinz.
-----Urspr�ngliche Nachricht-----
Von: favroweb@favroweb.com [mailto:favroweb@favroweb.com]
Gesendet: Freitag, 11. Februar 2005 18:31
An: poi-user@jakarta.apache.org
Betreff: Writing VBA macros with POI
I have an unusual request to be able to include a standard macro in
dynamically
generated Excel files that I stream from a J2EE application.
Is it possible to either:
1) Create the file dynamically with POI and add in macro code at
runtime?
Or
2) Perhaps have a static template xls file with the macro code already
in it
which I would then copy into memory using POI (assuming POI doesn't
damage or
alter the macro code) and then manipulate the cells with the data that I
then
stream to the user for download?
Thanks for any input.
Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
AW: Writing VBA macros with POI
Posted by "KHZ (SAW)" <ka...@sawag.com>.
Hi Brett.
2) is surely possible. The macro code from the template isn't lost.
1) wasn't possible some months ago and I don't think that this has
changed up to yet.
Regards, Karl-Heinz.
-----Ursprüngliche Nachricht-----
Von: favroweb@favroweb.com [mailto:favroweb@favroweb.com]
Gesendet: Freitag, 11. Februar 2005 18:31
An: poi-user@jakarta.apache.org
Betreff: Writing VBA macros with POI
I have an unusual request to be able to include a standard macro in
dynamically
generated Excel files that I stream from a J2EE application.
Is it possible to either:
1) Create the file dynamically with POI and add in macro code at
runtime?
Or
2) Perhaps have a static template xls file with the macro code already
in it
which I would then copy into memory using POI (assuming POI doesn't
damage or
alter the macro code) and then manipulate the cells with the data that I
then
stream to the user for download?
Thanks for any input.
Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/