1

From the documentation I came to know that SXSSFCell and XSSFCell are the implementing classes of Cell, but I am trying to understand the difference between different implementations. If I want to export data to excel, so which Cell implementation should I use? What exactly is the difference between SXSSFCell and XSSFCell ?

Mohsin M
  • 239
  • 7
  • 20

1 Answers1

1

Well in summary SXSSFCell is just an extension of XSSFCell. When to use it is making a large spreadsheets. If you are not making a huge spreadsheets then use only XSSFCell.

Check more the documentation:

SXSSF is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited. SXSSF achieves its low memory footprint by limiting access to the rows that are within a sliding window, while XSSF gives access to all rows in the document. Older rows that are no longer in the window become inaccessible, as they are written to the disk.

From https://poi.apache.org/components/spreadsheet/

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Gatusko
  • 2,503
  • 1
  • 17
  • 25
  • 3
    "SXSSFCell is just an extension of XSSFCell": This is not true. The cell classes `HSSFCell`, `SXSSFCell`, `XSSFCell` all extend `CellBase` which implements the interface `Cell`. What the `SXSSFCell` and `XSSFCell` have in common ist, that both handle cells of Office Open XML (`*.xlsx`) while `HSSFCell` handles cells of binary BIFF file system (`*.xls`). – Axel Richter Aug 23 '22 at 16:25