This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

streaming excel files on ServletOutputStream

 
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)???

 
Rancher
Posts: 43011
76
  • 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?
 
Ranch Hand
Posts: 182
  • 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.
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!