• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Query Regarding Reading Excel files at Runtime

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am storing Excel files in database. The database that I am using is Access. I have stored the Excel file as an OLE object in the database. I am required to read a Excel File at runtime from database and processing on it. I am using POI API from Apache to process the Excel files. The problem that I am facing is that POI API requires an Input Stream to the excel files for processing it. So how do I get an Input Stream to the excel files at runtime.
I tried out the following code but it is not working:
POIFSFileSystem excel = new POIFSFileSystem(new ObjectInputStream(rs.getBinaryStream("Excel")));
POIFSFileSystem excel = new POIFSFileSystem(rs.getBinaryStream("Excel"));
Where POIFSFileSystem is a class defined in the POI suite of classes and �rs� is an object of ResultSet class.
Here �Excel� is the name of the column in the database which stores excel files.
The error that I am getting it
test:java.io.IOException: Invalid header signature; read 8592825365, expected -2
226271756974174256
Regards
PK
[ January 02, 2004: Message edited by: pk kumar ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic