Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

streaming excel files on ServletOutputStream

 
m Shalaby
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic