fastexcel

Generate and read big Excel files quickly

There are not many alternatives when you have to generate xlsx Excel workbooks in Java. The most popular one (Apache POI) includes many features, but when it comes down to huge worksheets it quickly becomes a memory hog.

Its streaming API may mitigate this problem but it introduces several limitations:

  • Its sliding window mechanism prevents you from accessing cells above the current writing position.
  • It writes stuff to a temporary file.
  • It comes with an overhead on the file size because shared strings are disabled by default. Enabling shared strings is likely to consume much more heap if you deal with string values.

So, fastexcel has been created to offer an alternative with the following key points:

  • Limited set of features (basic style support, no graph support yet) and very simple API.
  • Reduced memory footprint and high performance by accumulating only necessary elements. XML stuff is piped to the output stream at the end.
  • Multithreading support: each worksheet in the workbook can be generated by a different thread, while fully supporting shared strings and styles.