Apache POI Introduction

Harry · 24 Sep 2026 · 1 views
Log in to track your progress and mark lessons complete.

What is Apache POI?

Apache POI is the open source Java library for Microsoft Office formats. The components you will use most are HSSF/XSSF (Excel .xls/.xlsx), HWPF/XWPF (Word .doc/.docx) and HSLF/XSLF (PowerPoint). This tutorial focuses on Excel, the 90% use case: reports, exports, imports and data migration.

Apache POI components overview

HSSF vs XSSF vs SXSSF

  • HSSF — old binary .xls (max 65,536 rows). Legacy only.
  • XSSF — modern .xlsx (OOXML). Default choice; whole workbook lives in memory.
  • SXSSF — streaming writer for huge .xlsx files; keeps only a sliding window of rows in memory.

poi vs poi-ooxml

The poi artefact covers the old binary formats; poi-ooxml adds the XML-based .xlsx/.docx support (plus xmlbeans and friends transitively). For new projects declare poi-ooxml — it pulls in poi automatically.

What You Will Build

Every lesson has runnable code in the companion poi-examples repo: writing workbooks, reading them back, styling, formulas, and a million-row streaming export.

Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in