java.lang.Object
com.aspose.cells.ListObject
- Direct Known Subclasses:
- ListObjectImp
public abstract class ListObject
- extends java.lang.Object
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 = new Workbook();
Cells cells = workbook.getWorksheets().get(0).getCells();
for (int i = 0; i < 5; i++)
{
cells.get(0, i).putValue(CellsHelper.columnIndexToName(i));
}
for (int row = 1; row < 10; row++)
{
for (int column = 0; column < 5; column++)
{
cells.get(row, column).putValue(row * column);
}
}
ListObjectCollection tables = workbook.getWorksheets().get(0).getListObjects();
int index = tables.add(0, 0, 9, 4, true);
ListObject table = tables.get(0);
table.setShowTotals(true);
table.getListColumns().get(4).setTotalsCalculation(TotalsCalculation.SUM);
workbook.save("C:\\Book1.xlsx");
|
Method Summary |
abstract void | applyStyleToRange() | |
|
Apply the table style to the range.
|
abstract void | convertToRange() | |
|
Convert the table to range.
|
abstract void | putCellValue(int rowOffset, int columnOffset, java.lang.Object value) | |
|
Put the value to the cell.
|
abstract void | resize(int startRow, int startColumn, int endRow, int endColumn, boolean hasHeaders) | |
|
Resize the range of the list object.
|
abstract void | updateColumnName() | |
|
Updates all list columns' name from the worksheet.
|
|
Property Getters/Setters Detail |
getStartRow | |
public abstract int getStartRow()
|
-
Gets the start row of the range.
getStartColumn | |
public abstract int getStartColumn()
|
-
Gets the start column of the range.
getEndRow | |
public abstract int getEndRow()
|
-
Gets the end row of the range.
getEndColumn | |
public abstract int getEndColumn()
|
-
Gets the end column of the range.
-
Gets ListColumns of the ListObject.
getShowHeaderRow/setShowHeaderRow | |
public abstract boolean getShowHeaderRow() / public abstract void setShowHeaderRow(boolean value)
|
-
Gets and sets whether this ListObject show header row.
getShowTotals/setShowTotals | |
public abstract boolean getShowTotals() / public abstract void setShowTotals(boolean value)
|
-
Gets and sets whether this ListObject show total row.
getDataRange | |
public abstract Range getDataRange()
|
-
Gets the data range of the ListObject.
getQueryTable | |
public abstract QueryTable getQueryTable()
|
-
Gets the linked QueryTable.
getDataSourceType | |
public abstract int getDataSourceType()
|
-
Gets the data source type of the table.
The value of the property is TableDataSourceType integer constant.
getAutoFilter | |
public abstract AutoFilter getAutoFilter()
|
-
Gets auto filter.
getDisplayName/setDisplayName | |
public abstract java.lang.String getDisplayName() / public abstract void setDisplayName(java.lang.String value)
|
-
Gets and sets the display name.
getComment/setComment | |
public abstract java.lang.String getComment() / public abstract void setComment(java.lang.String value)
|
-
Gets and sets the comment of the table.
getShowTableStyleFirstColumn/setShowTableStyleFirstColumn | |
public abstract boolean getShowTableStyleFirstColumn() / public abstract void setShowTableStyleFirstColumn(boolean value)
|
-
Indicates whether the first column in the table should have the style applied.
getShowTableStyleLastColumn/setShowTableStyleLastColumn | |
public abstract boolean getShowTableStyleLastColumn() / public abstract void setShowTableStyleLastColumn(boolean value)
|
-
Indicates whether the last column in the table should have the style applied.
getShowTableStyleRowStripes/setShowTableStyleRowStripes | |
public abstract boolean getShowTableStyleRowStripes() / public abstract void setShowTableStyleRowStripes(boolean value)
|
-
Indicates whether row stripe formatting is applied.
getShowTableStyleColumnStripes/setShowTableStyleColumnStripes | |
public abstract boolean getShowTableStyleColumnStripes() / public abstract void setShowTableStyleColumnStripes(boolean value)
|
-
Indicates whether column stripe formatting is applied.
getTableStyleType/setTableStyleType | |
public abstract int getTableStyleType() / public abstract void setTableStyleType(int value)
|
-
Gets and the built-in table style.
The value of the property is TableStyleType integer constant.
getTableStyleName/setTableStyleName | |
public abstract java.lang.String getTableStyleName() / public abstract void setTableStyleName(java.lang.String value)
|
-
Gets and sets the table style name.
resize | |
public abstract void resize(int startRow, int startColumn, int endRow, int endColumn, boolean hasHeaders) |
-
Resize the range of the list object.
- Parameters:
startRow - The start row index of the new range.startColumn - The start column index of the new range.endRow - The end row index of the new range.endColumn - The end column index of the new range.hasHeaders - Whether the ListObject has has headers.
putCellValue | |
public abstract void putCellValue(int rowOffset, int columnOffset, java.lang.Object value) |
-
Put the value to the cell.
- Parameters:
rowOffset - The row offset.columnOffset - The column offset.value - The cell value.
updateColumnName | |
public abstract void 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 | |
public abstract void applyStyleToRange() |
-
Apply the table style to the range.
convertToRange | |
public abstract void convertToRange() |
-
Convert the 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.