File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes streaming excel files on ServletOutputStream 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 "streaming excel files on ServletOutputStream" Watch "streaming excel files on ServletOutputStream" New topic
Author

streaming excel files on ServletOutputStream

m Shalaby
Greenhorn

Joined: Sep 09, 2009
Posts: 2
Hello,

I want to export an excel file on ServletOutputStream for a very large size of data that may exceeds 100K rows. I'm using POI APIs. and I'm trying to write 1000 row per time and flush the stream and then append the rest of rows 1000 row per time. Is that possible?
I could not do it with ServletOutputStream, but I did it with FileOutputStream!!! What is the difference between both setreams.

BTW, my silution on FileOutputStream is taking alot of time to create the file.

Here is the code that create the file on FileOutputStream incrementally:


------------------------------------------------------------------------------------

Have any one tryed to export large excel sheets (> 100K rows)???

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41101
    
  45
I always thought XLS files were limited to 64K rows; has that limit been relaxed?

The code looks as if you're overwriting the file for each sheet, not appending; does the generated file actually have all the information? Note that XLS is a structured document format for which you can't use file appending in the java.io sense; you'll need to work with the POI API.


} catch (Exception e) {
}

You should never do this if I/O is involved; how will you know about problems that occur? At least print a message to a log file.

I could not do it with ServletOutputStream

What does that mean?


Ping & DNS - my free Android networking tools app
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
I always thought XLS files were limited to 64K rows; has that limit been relaxed?

...in Excel 2007, the limit is increased multifold to 1000k from 65k.


love your job and not your company;
...because you never know when your company will stop loving you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: streaming excel files on ServletOutputStream
 
Similar Threads
Creating Exel File, streamming
Socket closed exception while downloading heavy files
java program for pdf file to excel file conversion
POI excel rewrite file
Using POI - Connection reset by peer