xls (HSSF) Overview

HSSF provides read and write support for the legacy xls (BIFF8) format. Coverage is ~35%.

Status

HSSF has grown beyond the original bootstrap reader/writer. It now supports practical basic workbook operations: common cell types, multiple sheets, basic styles, layout records, representative Apache POI fixture loading, Java POI interop slices, and preservation of non-workbook OLE streams, VBA streams, and unknown BIFF records during light edits.

It is still not a full Apache POI HSSF port. Images, shapes, chart creation, comment editing, filters, pivots, and new BIFF formula token writing are not modeled through public APIs.

Basic Read and Write

using DotnetPoi.HSSF.UserModel;

// Write
using var wb = new HSSFWorkbook();
var sheet = wb.createSheet("Sheet1");
var row = sheet.createRow(0);
row.createCell(0).setCellValue("Hello from HSSF");

using var file = File.Create("output.xls");
wb.write(file);

// Read
using var stream = File.OpenRead("input.xls");
using var wb2 = new HSSFWorkbook(stream);
var value = wb2.getSheetAt(0).getRow(0).getCell(0).getStringCellValue();

When to Use HSSF

When to Use XSSF Instead

Supported Today

Limitations

HSSF is maintained for compatibility but is not a priority for new development.