This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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.
 
Screaming fools! It's nothing more than a tiny ad:
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!