Hi Sunil,
I had faced a similar problem.But when i used POI 2.0, it worked fine.
Regards,
Nitesh Baranwal
----------------------------------
Member of Technical Staff
Persistent Systems Pvt Ltd.
Office : +91-20-30235744
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, September 18, 2006 3:23 PM
Subject: couldnt able to get workbook object for an excel containing
macros..
Hi all,
I could able to read and write into excel named abc.xls and now I have
one more file XXX.xls in the same directory where abc.xls is. But
XXX.xls contains macros and when I try to create workbook object there
itself I am getting recordFormatException saying blah blah blah.
I am attaching error message.
From some forum page I came to know that it will work if I use POI 2.0.
I have tried with both POI 2.5 and 2.0
[9/18/06 15:05:55:406 IST] 00000098 SystemOut O
Excels/PKJ-Sheets.xls
[9/18/06 15:05:55:406 IST] 00000098 SystemOut O inside generate
method : file name Excels/PKJ-Sheets.xls
[9/18/06 15:05:56:453 IST] 00000098 SystemOut O after
inputstreamgfgfffg+++++++++++++++++++++
[9/18/06 15:05:58:969 IST] 00000098 SystemOut O error due to Exp
org.apache.poi.hssf.record.RecordFormatException: Unable to construct
record instance, the following exception occured: null
[9/18/06 15:05:59:031 IST] 00000098 ServletWrappe A SRVE0242I:
[/jsp/XLGen/display.jsp]: Initialization successful.
[9/18/06 15:05:59:047 IST] 00000098 PropertyMessa I Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
[9/18/06 15:05:59:094 IST] 00000098 PropertyMessa I Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
[9/18/06 15:05:59:109 IST] 00000098 PropertyMessa I Initializing,
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
[9/18/06 15:05:57:906 IST] 00000098 SystemErr R [WARNING] Unknown
Ptg 3c (60)
[9/18/06 15:05:57:906 IST] 00000098 SystemErr R [WARNING] Unknown
Ptg 3c (60)
[9/18/06 15:05:57:922 IST] 00000098 SystemErr R [WARNING] Unknown
Ptg 3c (60)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java(Compiled Code))
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java(Compiled Code))
at
java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled
Code))
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
(Compiled Code))
....
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
at org.apache.poi.hssf.record.Record.<init>(Record.java(Compiled
Code))
at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
... 32 more
Thanks & Regards,
________________________________
Sunil Kumar Dhage
Senior Software Engineer
The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not
the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this
message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.
www.wipro.com
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Pvt. Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Pvt. Ltd. does not accept any liability for virus infected mails.
---------------------------------------------------------------------
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/