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)" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 11. Februar 2005 18:31
An: [email protected]
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: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
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.