Java Read Excel xlsx file – Part 1

Excel xlsx file can be read with plain java, because xlsx files are compressed xml files in one file, like a ZIP file.
Since java has an API to work with ZIP files we can treat a xlsx file like a zip file.

In this part I’ll extract the sheet files and additionally the file with all strings (sharedstrings).
One thing you should know is that this file with strings has only unique strings in it and these are mapped to sheets with integers. So all strings in xlsx file are saved only once, no duplicates.

Refer to part 2 to see how the value in a cell can be read from sheet and sharedstrings.

Get Sheet Streams

Get Strings as List


Go to Part 2

Recent Posts