asposecells.api
Class ListObject

Represents a list object on a worksheet. The ListObject object is a member of the ListObjects collection. The ListObjects collection contains all the list objects on a worksheet.

Example:

workbook = Workbook()
cells = workbook.getWorksheets().get(0).getCells()
for i in range(0, 5):
    cells.get(0, i).putValue(CellsHelper.columnIndexToName(i))
for row in range(1, 10):
    for column in range(0, 5):
        cells.get(row, column).putValue(row * column)

tables = workbook.getWorksheets().get(0).getListObjects()
index = tables.add(0, 0, 9, 4, True)
table = tables.get(0)
table.setShowTotals(True)
table.getListColumns().get(4).setTotalsCalculation(TotalsCalculation.SUM)
workbook.save("Book1.xlsx")

Property Getters/Setters Summary
methodgetAlternativeDescription()
methodsetAlternativeDescription(value)
           Gets and sets the alternative description.
methodgetAlternativeText()
methodsetAlternativeText(value)
           Gets and sets the alternative text.
methodgetAutoFilter()
           Gets auto filter.
methodgetComment()
methodsetComment(value)
           Gets and sets the comment of the table.
methodgetDataRange()
           Gets the data range of the ListObject.
methodgetDataSourceType()
           Gets the data source type of the table. The value of the property is TableDataSourceType integer constant.
methodgetDisplayName()
methodsetDisplayName(value)
           Gets and sets the display name.
methodgetEndColumn()
           Gets the end column of the range.
methodgetEndRow()
           Gets the end row of the range.
methodgetListColumns()
           Gets ListColumns of the ListObject.
methodgetQueryTable()
           Gets the linked QueryTable.
methodgetShowHeaderRow()
methodsetShowHeaderRow(value)
           Gets and sets whether this ListObject show header row.
methodgetShowTableStyleColumnStripes()
methodsetShowTableStyleColumnStripes(value)
           Indicates whether column stripe formatting is applied.
methodgetShowTableStyleFirstColumn()
methodsetShowTableStyleFirstColumn(value)
           Inidicates whether the first column in the table should have the style applied.
methodgetShowTableStyleLastColumn()
methodsetShowTableStyleLastColumn(value)
           Indicates whether the last column in the table should have the style applied.
methodgetShowTableStyleRowStripes()
methodsetShowTableStyleRowStripes(value)
           Indicates whether row stripe formatting is applied.
methodgetShowTotals()
methodsetShowTotals(value)
           Gets and sets whether this ListObject show total row.
methodgetStartColumn()
           Gets the start column of the range.
methodgetStartRow()
           Gets the start row of the range.
methodgetTableStyleName()
methodsetTableStyleName(value)
           Gets and sets the table style name.
methodgetTableStyleType()
methodsetTableStyleType(value)
           Gets and the built-in table style. The value of the property is TableStyleType integer constant.
methodgetXmlMap()
           Gets an XmlMap used for this list.
 
Method Summary
methodapplyStyleToRange()
           Apply the table style to the range.
methodconvertToRange()
           Convert the table to range.
methodconvertToRange(options)
           Convert the table to range.
methodputCellValue(rowOffset, columnOffset, value)
           Put the value to the cell.
methodresize(startRow, startColumn, endRow, endColumn, hasHeaders)
           Resize the range of the list object.
methodupdateColumnName()
           Updates all list columns' name from the worksheet.
 

Property Getters/Setters Detail

getStartRow : int 

int getStartRow()
Gets the start row of the range.

getStartColumn : int 

int getStartColumn()
Gets the start column of the range.

getEndRow : int 

int getEndRow()
Gets the end row of the range.

getEndColumn : int 

int getEndColumn()
Gets the end column of the range.

getListColumns : ListColumnCollection 

ListColumnCollection getListColumns()
Gets ListColumns of the ListObject.

getShowHeaderRow/setShowHeaderRow : boolean 

boolean getShowHeaderRow() / setShowHeaderRow(value)
Gets and sets whether this ListObject show header row.

getShowTotals/setShowTotals : boolean 

boolean getShowTotals() / setShowTotals(value)
Gets and sets whether this ListObject show total row.

getDataRange : Range 

Range getDataRange()
Gets the data range of the ListObject.

getQueryTable : QueryTable 

QueryTable getQueryTable()
Gets the linked QueryTable.

getDataSourceType : int 

int getDataSourceType()
Gets the data source type of the table. The value of the property is TableDataSourceType integer constant.

getAutoFilter : AutoFilter 

AutoFilter getAutoFilter()
Gets auto filter.

getDisplayName/setDisplayName : String 

String getDisplayName() / setDisplayName(value)
Gets and sets the display name.

getComment/setComment : String 

String getComment() / setComment(value)
Gets and sets the comment of the table.

getShowTableStyleFirstColumn/setShowTableStyleFirstColumn : boolean 

boolean getShowTableStyleFirstColumn() / setShowTableStyleFirstColumn(value)
Inidicates whether the first column in the table should have the style applied.

getShowTableStyleLastColumn/setShowTableStyleLastColumn : boolean 

boolean getShowTableStyleLastColumn() / setShowTableStyleLastColumn(value)
Indicates whether the last column in the table should have the style applied.

getShowTableStyleRowStripes/setShowTableStyleRowStripes : boolean 

boolean getShowTableStyleRowStripes() / setShowTableStyleRowStripes(value)
Indicates whether row stripe formatting is applied.

getShowTableStyleColumnStripes/setShowTableStyleColumnStripes : boolean 

boolean getShowTableStyleColumnStripes() / setShowTableStyleColumnStripes(value)
Indicates whether column stripe formatting is applied.

getTableStyleType/setTableStyleType : int 

int getTableStyleType() / setTableStyleType(value)
Gets and the built-in table style. The value of the property is TableStyleType integer constant.

getTableStyleName/setTableStyleName : String 

String getTableStyleName() / setTableStyleName(value)
Gets and sets the table style name.

getXmlMap : XmlMap 

XmlMap getXmlMap()
Gets an XmlMap used for this list.

getAlternativeText/setAlternativeText : String 

String getAlternativeText() / setAlternativeText(value)
Gets and sets the alternative text.

getAlternativeDescription/setAlternativeDescription : String 

String getAlternativeDescription() / setAlternativeDescription(value)
Gets and sets the alternative description.

Method Detail

resize

 resize(startRow, startColumn, endRow, endColumn, hasHeaders)
Resize the range of the list object.
Parameters:
startRow: int - The start row index of the new range.
startColumn: int - The start column index of the new range.
endRow: int - The end row index of the new range.
endColumn: int - The end column index of the new range.
hasHeaders: boolean - Whether the ListObject has has headers.

putCellValue

 putCellValue(rowOffset, columnOffset, value)
Put the value to the cell.
Parameters:
rowOffset: int - The row offset.
columnOffset: int - The column offset.
value: Object - The cell value.

updateColumnName

 updateColumnName()
Updates all list columns' name from the worksheet. The value of the cells in the header row of the table must be same as the name of the ListColumn; Cell.PutValue do not auto modify the name of the ListColumn for performance.

applyStyleToRange

 applyStyleToRange()
Apply the table style to the range.

convertToRange

 convertToRange()
Convert the table to range.

convertToRange

 convertToRange(options)
Convert the table to range.
Parameters:
options: TableToRangeOptions - the options when converting table to range.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.