[]
An ITableColumn object is a member of the ITableColumns collection, which contains all columns in an ITable.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableColumn tableColumn = table.getColumns().get(0);
String name = tableColumn.getName();
voiddelete()IRange that represents the data body cells of this table column.intgetIndex()ITableColumns collection.getName()getRange()IRange that represents this table column.getTotal()ITableColumn object.voidsetDataField(String value) voidvoidITableColumns collection.The index reflects the current position of the column in its parent ITable.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Name", "Value"},
{"A", 100},
{"B", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
int index = table.getColumns().get(1).getIndex();
This name is also used as the display name of the table column and must be unique within the table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
String name = table.getColumns().get(1).getName();
This name is also used as the display name of the table column and must be unique within the table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.getColumns().get(1).setName("Sample");
value - The name of the table column.The returned TotalsCalculation value determines how the totals cell for the column is calculated when the table shows a totals row.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.setShowTotals(true);
table.getColumns().get(1).setTotalsCalculation(TotalsCalculation.Sum);
TotalsCalculation calculation = table.getColumns().get(1).getTotalsCalculation();
TotalsCalculation.Use this method to specify how the totals cell for the column is calculated when the table displays a totals row.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.setShowTotals(true);
table.getColumns().get(1).setTotalsCalculation(TotalsCalculation.Sum);
value - The TotalsCalculation value that specifies the totals-row calculation for the table column.ITableColumn object.
worksheet.getRange("A1:B3").setValue(new Object[][] {{"Product", "Amount"}, {"Apple", 100}, {"Pear", 200}});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.setShowTotals(true);
IRange totalCell = table.getColumns().get(1).getTotal();
worksheet.getRange("A1:B3").setValue(new Object[][] {{"Product", "Amount"}, {"Apple", 100}, {"Pear", 200}});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
table.getColumns().get(1).delete();
IRange that represents the data body cells of this table column.The returned range includes only the data rows in the column and excludes the header cell and totals cell.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableColumn tableColumn = table.getColumns().get(1);
IRange dataBodyRange = tableColumn.getDataBodyRange();
dataBodyRange.setValue(new Object[][] {{120}, {220}});
IRange that represents the data body cells of this table column.IRange that represents this table column.The returned range covers the cells associated with the current ITableColumn within its parent table.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableColumn tableColumn = table.getColumns().get(1);
IRange range = tableColumn.getRange();
IRange that represents this table column.This property returns the field name associated with the current table column.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableColumn tableColumn = table.getColumns().get(0);
tableColumn.setDataField("Product");
String dataField = tableColumn.getDataField();
This method sets the field name associated with the current table column.
worksheet.getRange("A1:B3").setValue(new Object[][] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.getTables().add(worksheet.getRange("A1:B3"), true);
ITableColumn tableColumn = table.getColumns().get(0);
tableColumn.setDataField("Product");
value - The data field name of the current table column.