aspose file tools*
The moose likes Other Open Source Projects and the fly likes JExcel API and Servlet - File upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "JExcel API and Servlet - File upload" Watch "JExcel API and Servlet - File upload" New topic
Author

JExcel API and Servlet - File upload

Karthik Krishnamurthy
Ranch Hand

Joined: Feb 04, 2005
Posts: 118
Hi,
I am using JExcel API to read in an excel file on upload. I had originally written it so that the uploaded .xls file is stored locally and then read.
Now, the requirement has changed and I have to read it from a stream. Is there some way to use the JExcel API to do this? The com.oreilly servlet example that I got off google reads it line by line on the request and I would probably have to rewrite my whole code if it has to be done like that.

I have two sheets that I have to read from.
Sample code:
workbook = Workbook.getWorkbook(file);
Sheet1 = workbook.getSheet(0);
sheet2 =workbook.getSheet(1)

The i read sheet by sheet for the data.

Any help greatly appreciated

Thanks
Karthik
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41520
    
  53
The Workbook class has a getWorkbook(InputStream) method. That sounds like it might do the trick if you somehow can get the InputStream.


Ping & DNS - my free Android networking tools app
Karthik Krishnamurthy
Ranch Hand

Joined: Feb 04, 2005
Posts: 118
Thanks Ulf. I'll look it up and post my findings also here.

Karthik
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JExcel API and Servlet - File upload