|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxl.read.biff.SheetImpl
Represents a sheet within a workbook. Provides a handle to the individual cells, or lines of cells (grouped by Row or Column) In order to simplify this class due to code bloat, the actual reading logic has been delegated to the SheetReaderClass. This class' main responsibility is now to implement the API methods declared in the Sheet interface
Field Summary | |
private Cell[][] |
cells
The cells |
private java.util.ArrayList |
charts
A list of charts on this page |
private ColumnInfoRecord[] |
columnInfos
The list of specified (ie. |
private java.util.ArrayList |
columnInfosArray
An array of column info records. |
private boolean |
columnInfosInitialized
Indicates whether the columnInfos array has been initialized |
private File |
excelFile
The excel file |
private FooterRecord |
footer
The page footer |
private FormattingRecords |
formattingRecords
A handle to the formatting records |
private HeaderRecord |
header
The page header |
private boolean |
hidden
The hidden flag |
private java.util.ArrayList |
hyperlinks
A list of hyperlinks on this page |
private MergedCellsRecord |
mergedCells
A list of merged cells on this page |
private java.lang.String |
name
The name of this sheet |
private boolean |
nineteenFour
Indicates whether or not the dates are based around the 1904 date system |
private int |
numCols
The number of columns |
private int |
numRows
The number of rows |
private int[] |
rowBreaks
The horizontal page breaks contained on this sheet |
private java.util.ArrayList |
rowProperties
The list of non-default row properties |
private RowRecord[] |
rowRecords
The array of row records |
private boolean |
rowRecordsInitialized
Indicates whether the rowRecords array has been initialized |
private SheetSettings |
settings
The sheet settings |
private java.util.ArrayList |
sharedFormulas
A list of shared formula groups |
private SSTRecord |
sharedStrings
A handle to the shared string table |
private BOFRecord |
sheetBof
A handle to the sheet BOF record, which indicates the stream type |
private int |
startPosition
The start position in the stream of this sheet |
private WorkbookParser |
workbook
A handle to the workbook which contains this sheet. |
private BOFRecord |
workbookBof
A handle to the workbook BOF record, which indicates the stream type |
private WorkbookSettings |
workbookSettings
A handle to the workbook settings |
private WorkspaceInformationRecord |
workspaceOptions
The workspace options |
Constructor Summary | |
(package private) |
SheetImpl(File f,
SSTRecord sst,
FormattingRecords fr,
BOFRecord sb,
BOFRecord wb,
boolean nf,
WorkbookParser wp)
Constructor |
Method Summary | |
(package private) void |
clear()
Clears out the array of cells. |
Cell |
findCell(java.lang.String contents)
Gets the cell whose contents match the string passed in. |
LabelCell |
findLabelCell(java.lang.String contents)
Gets the cell whose contents match the string passed in. |
Cell |
getCell(int column,
int row)
Returns the cell specified at this row and at this column |
Chart[] |
getCharts()
Gets the charts. |
Cell[] |
getColumn(int col)
Gets all the cells on the specified column. |
CellFormat |
getColumnFormat(int col)
Deprecated. use getColumnView instead |
ColumnInfoRecord |
getColumnInfo(int col)
Gets the column info record for the specified column. |
ColumnInfoRecord[] |
getColumnInfos()
Gets all the column info records |
int |
getColumns()
Returns the number of columns in this sheet |
CellView |
getColumnView(int col)
Gets the column width for the specified column |
int |
getColumnWidth(int col)
Gets the column width for the specified column |
FooterRecord |
getFooter()
Gets the footer. |
HeaderRecord |
getHeader()
Gets the header. |
Hyperlink[] |
getHyperlinks()
Gets the hyperlinks on this sheet |
Range[] |
getMergedCells()
Gets the cells which have been merged on this sheet |
java.lang.String |
getName()
Gets the name of this sheet |
Cell[] |
getRow(int row)
Gets all the cells on the specified row. |
int |
getRowHeight(int row)
Deprecated. use getRowView instead |
(package private) RowRecord |
getRowInfo(int r)
Gets the row record. |
int[] |
getRowPageBreaks()
Gets the row breaks. |
RowRecord[] |
getRowProperties()
Gets the non-default rows. |
int |
getRows()
Returns the number of rows in this sheet |
CellView |
getRowView(int row)
Gets the row view for the specified row |
SheetSettings |
getSettings()
Accessor for the sheet settings |
BOFRecord |
getSheetBof()
Used when copying sheets in order to determine the type of this sheet |
(package private) WorkbookParser |
getWorkbook()
Accessor for the workbook |
WorkspaceInformationRecord |
getWorkspaceOptions()
Gets the workspace options for this sheet. |
boolean |
isHidden()
Deprecated. in favour of the getSettings function |
boolean |
isProtected()
Deprecated. in favour of the getSettings() api |
(package private) void |
readSheet()
Reads in the contents of this sheet |
(package private) void |
setHidden(boolean h)
Sets the visibility of this sheet |
(package private) void |
setName(java.lang.String s)
Sets the name of this sheet |
Methods inherited from class java.lang.Object |
|
Field Detail |
private File excelFile
private SSTRecord sharedStrings
private BOFRecord sheetBof
private BOFRecord workbookBof
private FormattingRecords formattingRecords
private java.lang.String name
private int numRows
private int numCols
private Cell[][] cells
private int startPosition
private ColumnInfoRecord[] columnInfos
private RowRecord[] rowRecords
private java.util.ArrayList rowProperties
private java.util.ArrayList columnInfosArray
private java.util.ArrayList sharedFormulas
private java.util.ArrayList hyperlinks
private java.util.ArrayList charts
private MergedCellsRecord mergedCells
private boolean columnInfosInitialized
private boolean rowRecordsInitialized
private boolean nineteenFour
private HeaderRecord header
private FooterRecord footer
private WorkspaceInformationRecord workspaceOptions
private boolean hidden
private SheetSettings settings
private int[] rowBreaks
private WorkbookParser workbook
private WorkbookSettings workbookSettings
Constructor Detail |
SheetImpl(File f, SSTRecord sst, FormattingRecords fr, BOFRecord sb, BOFRecord wb, boolean nf, WorkbookParser wp) throws BiffException
fr
- sst
- the shared string tablef
- the excel filesb
- the bof record which indicates the start of the sheetwb
- the bof record which indicates the start of the sheetwp
- the workbook which this sheet belongs toBiffException
- Method Detail |
public Cell getCell(int column, int row)
getCell
in interface Sheet
row
- the row numbercolumn
- the column numberpublic Cell findCell(java.lang.String contents)
findCell
in interface Sheet
contents
- the string to matchpublic LabelCell findLabelCell(java.lang.String contents)
findLabelCell
in interface Sheet
contents
- the string to matchpublic int getRows()
getRows
in interface Sheet
public int getColumns()
getColumns
in interface Sheet
public Cell[] getRow(int row)
getRow
in interface Sheet
row
- the rows whose cells are to be returnedpublic Cell[] getColumn(int col)
getColumn
in interface Sheet
col
- the column whose cells are to be returnedpublic java.lang.String getName()
getName
in interface Sheet
final void setName(java.lang.String s)
s
- public boolean isHidden()
isHidden
in interface Sheet
public ColumnInfoRecord getColumnInfo(int col)
public ColumnInfoRecord[] getColumnInfos()
final void setHidden(boolean h)
h
- final void clear()
final void readSheet()
public Hyperlink[] getHyperlinks()
getHyperlinks
in interface Sheet
public Range[] getMergedCells()
getMergedCells
in interface Sheet
public RowRecord[] getRowProperties()
RowRecord getRowInfo(int r)
r
- the rowpublic final HeaderRecord getHeader()
public final FooterRecord getFooter()
public final int[] getRowPageBreaks()
public final Chart[] getCharts()
public boolean isProtected()
isProtected
in interface Sheet
public WorkspaceInformationRecord getWorkspaceOptions()
public SheetSettings getSettings()
getSettings
in interface Sheet
WorkbookParser getWorkbook()
public CellFormat getColumnFormat(int col)
getColumnFormat
in interface Sheet
col
- the column numberpublic int getColumnWidth(int col)
getColumnWidth
in interface Sheet
col
- the column numberpublic CellView getColumnView(int col)
getColumnView
in interface Sheet
col
- the column numberpublic int getRowHeight(int row)
getRowHeight
in interface Sheet
row
- the row numberpublic CellView getRowView(int row)
getRowView
in interface Sheet
row
- the row numberpublic BOFRecord getSheetBof()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |