• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Problem in reading macros of Exel file

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i am using POI API for reading the Excel data . but in excel file contains some macros, list box buttons that is why i m facing some problem in reading that. i installed newer version of poi api 3.0 but i m getting problem in reading that. i m getting this execption
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance
at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:191)
at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:115)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:205)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:153)
at com.wipro.cairn.sunupload.biz.WorkBookExelReader.validateExcelFields(WorkBookExelReader.java:46)
at com.wipro.cairn.sunupload.biz.SunDataUploader.actionPerformed(SunDataUploader.java:123)Is file
An error occured while reading the file

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:179)
... 29 more
Caused by: org.apache.poi.hssf.record.RecordFormatException: HSSF does not currently support encrypted workbooks
at org.apache.poi.hssf.record.FilePassRecord.fillFields(FilePassRecord.java:70)
at org.apache.poi.hssf.record.Record.<init>(Record.java:56)
at org.apache.poi.hssf.record.FilePassRecord.<init>(FilePassRecord.java:53)
... 34 more

As the bold text says that Its not supported? than means no solution to that?
Actually i have to deliver this fast and have code for POI sowhat should i do in this case?


thanks,
Nishita
[ July 03, 2007: Message edited by: Nishita Jain ]
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the reason (lifted directly from the POI JavaDocs):


( HSSF does not support encryption because we don't feel like going to jail )


[ July 03, 2007: Message edited by: Paul Sturrock ]
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic