[]
此接口提供对各个 ITableStyleElement 对象的访问,这些对象定义表样式中特定部分的格式,例如整个表、标题行或汇总行。使用 ITableStyle.getTableStyleElements() 可以获取 ITableStyleElements 实例。
ITableStyle tableStyle = workbook.getTableStyles().add("CustomStyle");
ITableStyleElements elements = tableStyle.getTableStyleElements();
ITableStyleElement wholeTable = elements.get(TableStyleElementType.WholeTable);
int count = elements.getCount();
get(TableStyleElementType index) intgetCount()此方法返回当前 ITableStyleElements 集合中可用的 ITableStyleElement 对象数量。
ITableStyle tableStyle = workbook.getTableStyles().add("CustomStyle");
ITableStyleElements elements = tableStyle.getTableStyleElements();
int count = elements.getCount();
使用此方法可以访问定义表样式中特定部分格式的 ITableStyleElement,例如整个表或标题行。
ITableStyle tableStyle = workbook.getTableStyles().add("CustomTableStyle");
ITableStyleElement headerRow = tableStyle.getTableStyleElements().get(TableStyleElementType.HeaderRow);
headerRow.getInterior().setColor(Color.GetBlue());
index - 要检索的表样式元素类型。