• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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 ]
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic