jxl.read.biff
Class SheetReader

java.lang.Object
  |
  +--jxl.read.biff.SheetReader

final class SheetReader
extends java.lang.Object

Reads the sheet. This functionality was originally part of the SheetImpl class, but was separated out in order to simplify the former class


Field Summary
private  Cell[][] cells
          The cells
private  java.util.ArrayList charts
          The list of charts on this page
private  java.util.ArrayList columnInfosArray
          An array of column info records.
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  java.util.ArrayList hyperlinks
          A list of hyperlinks on this page
private  MergedCellsRecord mergedCells
          A list of merged cells on this page
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  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  SheetImpl sheet
          A handle to the sheet
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  int workspaceOptions
          The workspace options
 
Constructor Summary
(package private) SheetReader(File f, SSTRecord sst, FormattingRecords fr, BOFRecord wb, boolean nf, WorkbookParser wp, int sp, SheetImpl sh)
          Constructor
 
Method Summary
private  void addCell(Cell cell)
          Adds the cell to the array
private  boolean addToSharedFormulas(BaseSharedFormulaRecord fr)
          Sees if the shared formula belongs to any of the shared formula groups
(package private)  Cell[][] getCells()
           
(package private)  java.util.ArrayList getCharts()
           
(package private)  java.util.ArrayList getColumnInfosArray()
           
(package private)  FooterRecord getFooter()
           
(package private)  HeaderRecord getHeader()
           
(package private)  java.util.ArrayList getHyperlinks()
           
(package private)  MergedCellsRecord getMergedCells()
           
(package private)  int getNumCols()
           
(package private)  int getNumRows()
           
(package private)  int[] getRowBreaks()
           
(package private)  java.util.ArrayList getRowProperties()
           
(package private)  SheetSettings getSettings()
           
(package private)  int getWorkspaceOptions()
           
(package private)  void read()
          Reads in the contents of this sheet
private  Cell revertSharedFormula(BaseSharedFormulaRecord f)
          Reverts the shared formula passed in to an ordinary formula and adds it to the list
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

excelFile

private File excelFile
The excel file

sharedStrings

private SSTRecord sharedStrings
A handle to the shared string table

workbookBof

private BOFRecord workbookBof
A handle to the workbook BOF record, which indicates the stream type

formattingRecords

private FormattingRecords formattingRecords
A handle to the formatting records

numRows

private int numRows
The number of rows

numCols

private int numCols
The number of columns

cells

private Cell[][] cells
The cells

startPosition

private int startPosition
The start position in the stream of this sheet

rowProperties

private java.util.ArrayList rowProperties
The list of non-default row properties

columnInfosArray

private java.util.ArrayList columnInfosArray
An array of column info records. They are held this way before they are transferred to the more convenient array

sharedFormulas

private java.util.ArrayList sharedFormulas
A list of shared formula groups

hyperlinks

private java.util.ArrayList hyperlinks
A list of hyperlinks on this page

mergedCells

private MergedCellsRecord mergedCells
A list of merged cells on this page

charts

private java.util.ArrayList charts
The list of charts on this page

nineteenFour

private boolean nineteenFour
Indicates whether or not the dates are based around the 1904 date system

header

private HeaderRecord header
The page header

footer

private FooterRecord footer
The page footer

workspaceOptions

private int workspaceOptions
The workspace options

rowBreaks

private int[] rowBreaks
The horizontal page breaks contained on this sheet

settings

private SheetSettings settings
The sheet settings

workbook

private WorkbookParser workbook
A handle to the workbook which contains this sheet. Some of the records need this in order to reference external sheets

sheet

private SheetImpl sheet
A handle to the sheet
Constructor Detail

SheetReader

SheetReader(File f,
            SSTRecord sst,
            FormattingRecords fr,
            BOFRecord wb,
            boolean nf,
            WorkbookParser wp,
            int sp,
            SheetImpl sh)
Constructor
Parameters:
fr -  
sst - the shared string table
f - the excel file
sb - the bof record which indicates the start of the sheet
wb - the bof record which indicates the start of the sheet
wp - the workbook which this sheet belongs to
sp - the start position of the sheet bof in the excel file
sh - the sheet
Throws:
BiffException -  
Method Detail

addCell

private void addCell(Cell cell)
Adds the cell to the array
Parameters:
cell -  

read

final void read()
Reads in the contents of this sheet

addToSharedFormulas

private boolean addToSharedFormulas(BaseSharedFormulaRecord fr)
Sees if the shared formula belongs to any of the shared formula groups
Parameters:
fr - the candidate shared formula

revertSharedFormula

private Cell revertSharedFormula(BaseSharedFormulaRecord f)
Reverts the shared formula passed in to an ordinary formula and adds it to the list
Returns:
the formula

getNumRows

final int getNumRows()

getNumCols

final int getNumCols()

getCells

final Cell[][] getCells()

getRowProperties

final java.util.ArrayList getRowProperties()

getColumnInfosArray

final java.util.ArrayList getColumnInfosArray()

getHyperlinks

final java.util.ArrayList getHyperlinks()

getCharts

final java.util.ArrayList getCharts()

getMergedCells

final MergedCellsRecord getMergedCells()

getHeader

final HeaderRecord getHeader()

getFooter

final FooterRecord getFooter()

getSettings

final SheetSettings getSettings()

getRowBreaks

final int[] getRowBreaks()

getWorkspaceOptions

final int getWorkspaceOptions()