ActiveXLS v6.4.0 API Documentation

ActiveXLS
Class ExcelTable

System.Object
  extended byActiveXLS.ExcelTable

public class ExcelTable
extends System.Object

This class simulates a worksheet table. It is assigned to an ExcelWorksheet class. It allows to access the spreadsheet cells, to add rows and columns, to set default row height and column width, to add horizontal and vertical page breaks for page break preview.


Constructor Summary
ExcelTable()
          Defines an instance of the worksheet table.
 
Method Summary
 ExcelTable Clone()
          Creates and returns a copy of this object.
 int ColumnCount()
          Returns the number of columns from the table.
 void Dispose()
          Dispose any resources that it has allocated.
 void esd_addColumn()
          Adds a column to table.
 void esd_addColumn(ExcelColumn columnData)
          Adds the specified column to table.
 void esd_addRow()
          Adds a row to table.
 void esd_addRow(ExcelRow rowData)
          Adds the specified row to table.
 void esd_freezePanes(int splitRow, int splitColumn)
          Sets the freeze panes for the table.
 void esd_freezePanes(int splitRow, int splitColumn, int topVisibleRow_BottomPane, int leftVisibleColumn_RightPane)
          Set the freeze panes for the table.
 ExcelCell esd_getCell(int row, int column)
          If a cell does not exist at the specified position, it creates one, and returns the cell.
 ExcelCell esd_getCell(System.String cellReference)
          Returns the cell at the specified reference.
 ExcelCell esd_getCellAt(int row, int column)
          Returns the cell at the specified row and column.
 int esd_getCellMergingFirstCol(int nIndex)
          Returns the first column of the specified cell merging range.
 int esd_getCellMergingFirstRow(int nIndex)
          Returns the first row of the specified cell merging range.
 int esd_getCellMergingLastCol(int nIndex)
          Returns the last column of the specified cell merging range.
 int esd_getCellMergingLastRow(int nIndex)
          Returns the last row of the specified cell merging range.
 ExcelColumn esd_getColumnAt(int column)
          Returns the column at the specified position.
 System.String esd_getMergingRangeAsA1Reference(int nIndex)
          Internal use only Returns the cell merging range at the specified range as A1 reference (e.g.
 ExcelRow esd_getRowAt(int row)
          Returns the row at specified position.
 void esd_insertColumn(int column, ExcelColumn columnData)
          Inserts the specified column to table into the specified position.
 void esd_insertPageBreakAtColumn(int column)
          Inserts a page break after the specified column.
 void esd_insertPageBreakAtRow(int row)
          Inserts a page break after the specified row.
 void esd_insertRow(int row, ExcelRow rowData)
          Inserts the specified row to table into the specified position.
 void esd_mergeCells(int startRow, int startColumn, int endRow, int endColumn)
           
 void esd_mergeCells(System.String range)
          Merging the cells inside the specified range.
 void esd_mergeCells(System.String startCellReference, System.String endCellReference)
          Merging the cells inside the range limited by the specified cell references.
 void esd_removeCellMerging(int nIndex)
          Removes the cell merging area at the specified index from the table
 void esd_removeColumn(int column)
          Removes the column at the specified index from the table
 void esd_removeRow(int row)
          Removes the row at the specified index from the table
 void esd_removeSplit()
          Removes the split option for the table.
 void esd_resetAllPageBreaks()
          Resets all the defined page breaks.
 void esd_setCellAt(ExcelCell cell, int row, int column)
          Sets the cell at the specified position.
 void esd_setRangeAutoFormat(int startRow, int startColumn, int endRow, int endColumn, ExcelAutoFormat xlsAutoFormat)
          Sets the specified autoformat for the range.
 void esd_setRangeAutoFormat(System.String range, ExcelAutoFormat xlsAutoFormat)
          Sets the specified autoformat for the range.
 void esd_setRangeAutoFormat(System.String startCellReference, System.String endCellReference, ExcelAutoFormat xlsAutoFormat)
          Sets the specified autoformat for the range limited by the specified cell references.
 void esd_setRangeStyle(int startRow, int startColumn, int endRow, int endColumn, ExcelStyle style)
          Sets the specified style for the range limited by the rows and columns.
 void esd_setRangeStyle(System.String range, ExcelStyle style)
          Sets the specified style for the range.
 void esd_setRangeStyle(System.String startCellReference, System.String endCellReference, ExcelStyle style)
          Sets the specified style for the range limited by the specified cell references.
 void esd_split(int splitRow, int splitColumn)
          Sets the split option for the table.
 void esd_split(int splitRow, int splitColumn, int topVisibleRow_BottomPane, int leftVisibleColumn_RightPane)
          Set the split option for the table.
 void esd_unfreezePanes()
          Unfreezes panes for the table.
 int getColumnWidth()
          Returns the default width of the columns.
 int getColumnWidth(int column)
          Returns the width of the specified column.
 List getHorizontalPageBreaks()
          Returns a list with all horizontal page breaks
 int getRowHeight()
          Returns the default height of the rows.
 int getRowHeight(int row)
          Returns the height of the specified row.
 List getVerticalPageBreaks()
          Returns a list with all vertical page breaks
 bool IsFreezePaneSet()
          Returns true if the row/columns are frozen, false otherwise.
 bool IsRowHeightSet()
          Returns true if the default row height was set, false otherwise.
 bool IsSplitSet()
          Returns true if the row/columns are split, false otherwise.
 int MergeCellRangesCount()
          Returns the count of the cell merging ranges.
 int RowCount()
          Returns the number of rows from the table.
 void setColumnCount(int count)
          Sets the number of columns for the table.
 void setColumnWidth(int width)
          Sets the default width of the columns.
 void setColumnWidth(int column, int columnWidth)
          Sets the width for the specified column.
 void setFreezePaneSet(bool bValue)
          Internal use only
 void setRowCount(int count)
          Sets the number of rows for the table.
 void setRowHeight(int height)
          Sets the default height of the rows.
 void setRowHeight(int row, int rowHeight)
          Sets the height for the specified row.
 void setRowHeightSet(bool bValue)
          Internal use only
 void setSplitSet(bool bValue)
          Internal use only
 

Constructor Detail

ExcelTable

public ExcelTable()
Defines an instance of the worksheet table.

Method Detail

RowCount

public int RowCount()
Returns the number of rows from the table.

Returns:
the number of rows from the table
See Also:
setRowCount(int)

setRowCount

public void setRowCount(int count)
Sets the number of rows for the table.

Parameters:
count - the number of rows from the table
See Also:
RowCount()

esd_addRow

public void esd_addRow()
Adds a row to table.

See Also:
esd_insertRow(int, ActiveXLS.ExcelRow), esd_removeRow(int)

esd_addRow

public void esd_addRow(ExcelRow rowData)
Adds the specified row to table.

Parameters:
rowData - the row to be added
See Also:
esd_insertRow(int, ActiveXLS.ExcelRow), esd_removeRow(int)

esd_insertRow

public void esd_insertRow(int row,
                          ExcelRow rowData)
Inserts the specified row to table into the specified position.

Parameters:
row - the position where the row will be inserted
rowData - the row to be inserted
See Also:
esd_addRow(), esd_removeRow(int)

esd_removeRow

public void esd_removeRow(int row)
Removes the row at the specified index from the table

Parameters:
row - the row index
See Also:
esd_addRow(), esd_insertRow(int, ActiveXLS.ExcelRow)

getRowHeight

public int getRowHeight()
Returns the default height of the rows.

Returns:
the default height of the rows
See Also:
setRowHeight(int), getRowHeight(int), setRowHeight(int,int)

setRowHeight

public void setRowHeight(int height)
Sets the default height of the rows.

Parameters:
height - the default height of the rows
See Also:
getRowHeight(), getRowHeight(int), setRowHeight(int,int)

IsRowHeightSet

public bool IsRowHeightSet()
Returns true if the default row height was set, false otherwise.

Returns:
true if the default row height was set, false otherwise
See Also:
setRowHeight(int)

setRowHeightSet

public void setRowHeightSet(bool bValue)
Internal use only


getRowHeight

public int getRowHeight(int row)
Returns the height of the specified row.

Parameters:
row - the index of the row for which to return the height
Returns:
the height of the specified row
See Also:
getRowHeight(), setRowHeight(int), setRowHeight(int,int)

setRowHeight

public void setRowHeight(int row,
                         int rowHeight)
Sets the height for the specified row.

Parameters:
row - the index of the row
rowHeight - the new value of the height
See Also:
getRowHeight(), setRowHeight(int), getRowHeight(int)

esd_getRowAt

public ExcelRow esd_getRowAt(int row)
Returns the row at specified position.

Parameters:
row - the row position
Returns:
the row at specified position

ColumnCount

public int ColumnCount()
Returns the number of columns from the table.

Returns:
the number of columns from the table
See Also:
setColumnCount(int)

setColumnCount

public void setColumnCount(int count)
Sets the number of columns for the table.

Parameters:
count - the number of columns for the table
See Also:
ColumnCount()

esd_addColumn

public void esd_addColumn()
Adds a column to table.

See Also:
esd_insertColumn(int, ActiveXLS.ExcelColumn), esd_removeColumn(int)

esd_addColumn

public void esd_addColumn(ExcelColumn columnData)
Adds the specified column to table.

Parameters:
columnData - the column to be added
See Also:
esd_insertColumn(int, ActiveXLS.ExcelColumn), esd_removeColumn(int)

esd_insertColumn

public void esd_insertColumn(int column,
                             ExcelColumn columnData)
Inserts the specified column to table into the specified position.

Parameters:
column - the position where the column will be inserted
columnData - the column to be inserted
See Also:
esd_addColumn(), esd_removeColumn(int)

esd_removeColumn

public void esd_removeColumn(int column)
Removes the column at the specified index from the table

Parameters:
column - the column index
See Also:
esd_addColumn(), esd_insertColumn(int, ActiveXLS.ExcelColumn)

getColumnWidth

public int getColumnWidth()
Returns the default width of the columns.

Returns:
the default width of the columns
See Also:
setColumnWidth(int), getColumnWidth(int), setColumnWidth(int,int)

setColumnWidth

public void setColumnWidth(int width)
Sets the default width of the columns.

Parameters:
width - the new default width of the columns
See Also:
getColumnWidth(), getColumnWidth(int), setColumnWidth(int,int)

getColumnWidth

public int getColumnWidth(int column)
Returns the width of the specified column.

Parameters:
column - the column index for witch to return the width
Returns:
the width of the specified column
See Also:
getColumnWidth(), setColumnWidth(int), setColumnWidth(int,int)

setColumnWidth

public void setColumnWidth(int column,
                           int columnWidth)
Sets the width for the specified column.

Parameters:
column - the column position
columnWidth - the new width of the column
See Also:
getColumnWidth(), setColumnWidth(int), getColumnWidth(int)

esd_getColumnAt

public ExcelColumn esd_getColumnAt(int column)
Returns the column at the specified position.

Parameters:
column - the column position
Returns:
the column at specified position

esd_getCellAt

public ExcelCell esd_getCellAt(int row,
                               int column)
Returns the cell at the specified row and column. If the cell does not exist an 'array index out of range exception' will be thrown.

Parameters:
row - the row that specifies the cell position
column - the column that specifies the cell position
Returns:
the cell at specified position
See Also:
esd_getCell(int, int), esd_setCellAt(ActiveXLS.ExcelCell, int, int)

esd_getCell

public ExcelCell esd_getCell(int row,
                             int column)
If a cell does not exist at the specified position, it creates one, and returns the cell. Note: Slower than esd_getCellAt method.

Parameters:
row - the row that specifies the cell position
column - the column that specifies the cell position
Returns:
the cell at specified position
See Also:
esd_getCellAt(int, int), esd_setCellAt(ActiveXLS.ExcelCell, int, int)

esd_getCell

public ExcelCell esd_getCell(System.String cellReference)
Returns the cell at the specified reference.

Parameters:
cellReference - the cell reference that specifies the cell position
Returns:
the cell at specified position
See Also:
esd_getCell(int, int), esd_setCellAt(ActiveXLS.ExcelCell, int, int)

esd_setCellAt

public void esd_setCellAt(ExcelCell cell,
                          int row,
                          int column)
Sets the cell at the specified position.

Parameters:
cell - the cell to be set
row - the row position
column - the column position
See Also:
esd_getCellAt(int, int), esd_getCell(int, int)

esd_setRangeAutoFormat

public void esd_setRangeAutoFormat(int startRow,
                                   int startColumn,
                                   int endRow,
                                   int endColumn,
                                   ExcelAutoFormat xlsAutoFormat)
Sets the specified autoformat for the range.

Parameters:
startRow - the row that limits the left upper corner of the cell range
startColumn - the column that limits the left upper corner of the cell range
endRow - the row that limits the right down corner of the cell range
endColumn - the column that limits the right down corner of the cell range
xlsAutoFormat - the autoformat to be applied

esd_setRangeAutoFormat

public void esd_setRangeAutoFormat(System.String range,
                                   ExcelAutoFormat xlsAutoFormat)
Sets the specified autoformat for the range.

Parameters:
range - the range where the autoformat will be applied. It can be a cell reference or a range.
xlsAutoFormat - the autoformat to be applied

esd_setRangeAutoFormat

public void esd_setRangeAutoFormat(System.String startCellReference,
                                   System.String endCellReference,
                                   ExcelAutoFormat xlsAutoFormat)
Sets the specified autoformat for the range limited by the specified cell references.

Parameters:
startCellReference - the cell reference that limits the left upper corner of the cell range
endCellReference - the cell reference that limits the right down corner of the cell range
xlsAutoFormat - the autoformat to be applied

esd_setRangeStyle

public void esd_setRangeStyle(int startRow,
                              int startColumn,
                              int endRow,
                              int endColumn,
                              ExcelStyle style)
Sets the specified style for the range limited by the rows and columns.

Parameters:
startRow - the row that limits the left upper corner of the cell range
startColumn - the column that limits the left upper corner of the cell range
endRow - the row that limits the right down corner of the cell range
endColumn - the column that limits the right down corner of the cell range
style - the style for the cells

esd_setRangeStyle

public void esd_setRangeStyle(System.String range,
                              ExcelStyle style)
Sets the specified style for the range.

Parameters:
range - the range where the style will be applied. It can be a cell reference or a range.
style - the style for the cells

esd_setRangeStyle

public void esd_setRangeStyle(System.String startCellReference,
                              System.String endCellReference,
                              ExcelStyle style)
Sets the specified style for the range limited by the specified cell references.

Parameters:
startCellReference - the cell reference that limits the left upper corner of the cell range
endCellReference - the cell reference that limits the right down corner of the cell range
style - the style for the cells

esd_mergeCells

public void esd_mergeCells(int startRow,
                           int startColumn,
                           int endRow,
                           int endColumn)

esd_mergeCells

public void esd_mergeCells(System.String range)
Merging the cells inside the specified range.

Parameters:
range - the cell range
See Also:
esd_mergeCells(int,int,int,int), esd_mergeCells(String,String)

esd_mergeCells

public void esd_mergeCells(System.String startCellReference,
                           System.String endCellReference)
Merging the cells inside the range limited by the specified cell references.

Parameters:
startCellReference - the cell reference that limits the left upper corner of the cell range
endCellReference - the cell reference that limits the right down corner of the cell range
See Also:
esd_mergeCells(int,int,int,int), esd_mergeCells(String)

esd_getMergingRangeAsA1Reference

public System.String esd_getMergingRangeAsA1Reference(int nIndex)
Internal use only Returns the cell merging range at the specified range as A1 reference (e.g. B2:G9).

Parameters:
nIndex - the merge cells range index
Returns:
cell merging range at the specified range as A1 reference (e.g. B2:G9)

esd_getCellMergingFirstRow

public int esd_getCellMergingFirstRow(int nIndex)
Returns the first row of the specified cell merging range.

Parameters:
nIndex - the merge cells range index
Returns:
the first row of the specified cell merging range
See Also:
esd_getCellMergingLastRow(int), esd_getCellMergingFirstCol(int), esd_getCellMergingLastCol(int)

esd_getCellMergingLastRow

public int esd_getCellMergingLastRow(int nIndex)
Returns the last row of the specified cell merging range.

Parameters:
nIndex - the merge cells range index
Returns:
the last row of the specified cell merging range
See Also:
esd_getCellMergingFirstRow(int), esd_getCellMergingFirstCol(int), esd_getCellMergingLastCol(int)

esd_getCellMergingFirstCol

public int esd_getCellMergingFirstCol(int nIndex)
Returns the first column of the specified cell merging range.

Parameters:
nIndex - the merge cells range index
Returns:
the first column of the specified cell merging range
See Also:
esd_getCellMergingFirstRow(int), esd_getCellMergingLastRow(int), esd_getCellMergingLastCol(int)

esd_getCellMergingLastCol

public int esd_getCellMergingLastCol(int nIndex)
Returns the last column of the specified cell merging range.

Parameters:
nIndex - the merge cells range index
Returns:
the last column of the specified cell merging range
See Also:
esd_getCellMergingFirstRow(int), esd_getCellMergingLastRow(int), esd_getCellMergingFirstCol(int)

MergeCellRangesCount

public int MergeCellRangesCount()
Returns the count of the cell merging ranges.

Returns:
the count of the cell merging ranges

esd_removeCellMerging

public void esd_removeCellMerging(int nIndex)
Removes the cell merging area at the specified index from the table

Parameters:
nIndex - the cell merging area index

esd_insertPageBreakAtRow

public void esd_insertPageBreakAtRow(int row)
Inserts a page break after the specified row.

Parameters:
row - the row after which the page break will be inserted
See Also:
esd_insertPageBreakAtColumn(int), esd_resetAllPageBreaks()

esd_insertPageBreakAtColumn

public void esd_insertPageBreakAtColumn(int column)
Inserts a page break after the specified column.

Parameters:
column - the column after which the page break will be inserted
See Also:
esd_insertPageBreakAtRow(int), esd_resetAllPageBreaks()

esd_resetAllPageBreaks

public void esd_resetAllPageBreaks()
Resets all the defined page breaks.

See Also:
esd_insertPageBreakAtRow(int), esd_insertPageBreakAtColumn(int)

getHorizontalPageBreaks

public List getHorizontalPageBreaks()
Returns a list with all horizontal page breaks

Returns:
a list with all horizontal page breaks
See Also:
getVerticalPageBreaks()

getVerticalPageBreaks

public List getVerticalPageBreaks()
Returns a list with all vertical page breaks

Returns:
a list with all vertical page breaks
See Also:
getHorizontalPageBreaks()

esd_freezePanes

public void esd_freezePanes(int splitRow,
                            int splitColumn)
Sets the freeze panes for the table.

Parameters:
splitRow - the row position of the split
splitColumn - the column position of the split
See Also:
esd_freezePanes(int,int,int,int), esd_unfreezePanes()

esd_freezePanes

public void esd_freezePanes(int splitRow,
                            int splitColumn,
                            int topVisibleRow_BottomPane,
                            int leftVisibleColumn_RightPane)
Set the freeze panes for the table.

Parameters:
splitRow - the row position of the split
splitColumn - the column position of the split
topVisibleRow_BottomPane - the top row visible in the bottom pane
leftVisibleColumn_RightPane - the left most column visible in the right pane
See Also:
esd_freezePanes(int,int), esd_unfreezePanes()

esd_split

public void esd_split(int splitRow,
                      int splitColumn)
Sets the split option for the table.

Parameters:
splitRow - the row position of the split
splitColumn - the column position of the split
See Also:
esd_split(int,int,int,int), esd_removeSplit()

esd_split

public void esd_split(int splitRow,
                      int splitColumn,
                      int topVisibleRow_BottomPane,
                      int leftVisibleColumn_RightPane)
Set the split option for the table.

Parameters:
splitRow - the row position of the split
splitColumn - the column position of the split
topVisibleRow_BottomPane - the top row visible in the bottom pane
leftVisibleColumn_RightPane - the left most visible column in the right pane
See Also:
esd_split(int,int), esd_removeSplit()

esd_unfreezePanes

public void esd_unfreezePanes()
Unfreezes panes for the table.

See Also:
esd_freezePanes(int,int), esd_freezePanes(int,int,int,int)

esd_removeSplit

public void esd_removeSplit()
Removes the split option for the table.

See Also:
esd_split(int,int), esd_split(int,int,int,int)

IsFreezePaneSet

public bool IsFreezePaneSet()
Returns true if the row/columns are frozen, false otherwise.

Returns:
true if the row/columns are frozen, false otherwise.
See Also:
esd_freezePanes(int,int)

setFreezePaneSet

public void setFreezePaneSet(bool bValue)
Internal use only


IsSplitSet

public bool IsSplitSet()
Returns true if the row/columns are split, false otherwise.

Returns:
true if the row/columns are split, false otherwise.
See Also:
esd_split(int,int,int,int)

setSplitSet

public void setSplitSet(bool bValue)
Internal use only


Dispose

public void Dispose()
Dispose any resources that it has allocated.


Clone

public ExcelTable Clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

Copyright 2009 On Time Computing Solutions