public class ListColumn
extends java.lang.Object
Example
Workbook workbook = new Workbook();
Cells cells = workbook.getWorksheets().get(0).getCells();
for (int i = 0; i ɝ i++)
{
cells.get(0,i).putValue(CellsHelper.columnIndexToName(i));
}
for (int row = 1; row row++)
{
for (int column = 0; column ɜ 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);
ListColumn listColumn = table.getListColumns().get(4);
listColumn.setTotalsCalculation(com.aspose.cells.TotalsCalculation.SUM);
listColumn.setFormula("=[A]");
workbook.save("Book1.xlsx");
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCustomCalculatedFormula(boolean isR1C1,
boolean isLocal)
Gets the formula of this list column.
|
java.lang.String |
getCustomTotalsRowFormula(boolean isR1C1,
boolean isLocal)
Gets the formula of totals row of this list column.
|
Style |
getDataStyle()
Gets the style of the data in this column of the table.
|
java.lang.String |
getFormula()
Gets the formula of the list column.
|
java.lang.String |
getName()
Gets the name of the column.
|
Range |
getRange()
Gets the range of this list column.
|
int |
getTotalsCalculation()
Gets the type of calculation in the Totals row of the list column.
|
java.lang.String |
getTotalsRowLabel()
Gets the display labels of total row.
|
boolean |
isArrayFormula()
Indicates whether the fomula is array formula.
|
void |
setCustomCalculatedFormula(java.lang.String formula,
boolean isR1C1,
boolean isLocal)
Sets the formula for this list column.
|
void |
setCustomTotalsRowFormula(java.lang.String formula,
boolean isR1C1,
boolean isLocal)
Gets the formula of totals row of this list column.
|
void |
setDataStyle(Style style)
Sets the style of the data in this column of the table.
|
void |
setFormula(java.lang.String value)
Sets the formula of the list column.
|
void |
setName(java.lang.String value)
Sets the name of the column.
|
void |
setTotalsCalculation(int value)
Sets the type of calculation in the Totals row of the list column.
|
void |
setTotalsRowLabel(java.lang.String value)
Sets the display labels of total row.
|
public java.lang.String getName()
Remarks
If sets the name of the column, the according cell' value will be changed too.public void setName(java.lang.String value)
Remarks
If sets the name of the column, the according cell' value will be changed too.public int getTotalsCalculation()
See TotalsCalculation.
public void setTotalsCalculation(int value)
See TotalsCalculation.
public Range getRange()
public java.lang.String getCustomTotalsRowFormula(boolean isR1C1,
boolean isLocal)
isR1C1 - Whether the formula needs to be formatted as R1C1.isLocal - Whether the formula needs to be formatted by locale.public void setCustomTotalsRowFormula(java.lang.String formula,
boolean isR1C1,
boolean isLocal)
formula - the formula for this list column.isR1C1 - Whether the formula needs to be formatted as R1C1.isLocal - Whether the formula needs to be formatted by locale.public boolean isArrayFormula()
public java.lang.String getFormula()
public void setFormula(java.lang.String value)
public java.lang.String getCustomCalculatedFormula(boolean isR1C1,
boolean isLocal)
isR1C1 - Whether the formula needs to be formatted as R1C1.isLocal - Whether the formula needs to be formatted by locale.public void setCustomCalculatedFormula(java.lang.String formula,
boolean isR1C1,
boolean isLocal)
formula - the formula for this list column.isR1C1 - Whether the formula needs to be formatted as R1C1.isLocal - Whether the formula needs to be formatted by locale.public java.lang.String getTotalsRowLabel()
public void setTotalsRowLabel(java.lang.String value)
public Style getDataStyle()
public void setDataStyle(Style style)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.