Home

HSSFSheet

HSSFSheet is a class in the Apache POI library that represents a worksheet in an HSSF workbook, the component that handles Excel 97-2003 binary files (.xls). It is a concrete implementation of the Sheet interface used by applications to interact with the contents of a sheet in an HSSFWorkbook.

From an application perspective, HSSFSheet provides access to rows and cells. You can create and retrieve rows

In addition to basic data access, HSSFSheet supports sheet-level properties and layout features, including setting default

Under the hood, HSSFSheet interacts with HSSFWorkbook and BIFF8 records; it is designed for the older binary

HSSFSheet is used when working with .xls files in the POI ecosystem. It is part of the

with
createRow(int)
and
getRow(int),
and
access
cells
through
the
Row
and
Cell
interfaces
to
read
or
write
values,
formulas,
and
styles.
The
sheet
works
in
tandem
with
the
workbook’s
data
format
and
font
style
managers
to
apply
consistent
formatting.
column
widths
and
row
heights,
adjusting
column
widths,
merging
cell
regions,
and
managing
page
breaks
and
print
setup.
It
also
allows
toggling
display
options
such
as
gridlines
and
supports
standard
row
and
column
iteration
via
methods
like
getFirstRowNum
and
getLastRowNum.
format.
Writing
changes
to
disk
is
performed
through
the
HSSFWorkbook.write(OutputStream)
method.
Features
specific
to
the
newer
OOXML
format
available
in
XSSFSheet
are
not
provided
by
HSSFSheet.
POI
usermodel,
and
its
methods
are
also
accessible
through
the
common
SS
API
to
facilitate
format-agnostic
code
when
appropriate.