org.apache.poi.xssf.usermodel.XSSFTable.getCTTable()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.apache.poi.xssf.usermodel.XSSFTable.getCTTable()方法的一些代码示例,展示了XSSFTable.getCTTable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFTable.getCTTable()方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFTable
类名称:XSSFTable
方法名:getCTTable

XSSFTable.getCTTable介绍

[英]get the underlying CTTable XML bean
[中]获取底层CTTable XML bean

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Remove table references and relations
 * @param t table to remove
 */
public void removeTable(XSSFTable t) {
  long id = t.getCTTable().getId();
  Map.Entry<String, XSSFTable> toDelete = null;
  for (Map.Entry<String, XSSFTable> entry : tables.entrySet()) {
    if (entry.getValue().getCTTable().getId() == id) toDelete = entry;
  }
  if (toDelete != null) {
    removeRelation(getRelationById(toDelete.getKey()), true);
    tables.remove(toDelete.getKey());
    toDelete.getValue().onTableDelete();
  }
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * set sheet title in excel file
 *
 * @param title
 *            title of sheet
 * @param column
 *            column index
 * @return return cell reference
 * @since POI 4.0.0
 */
public CellReference setSheetTitle(String title, int column) {
  XSSFSheet sheet = getSheet();
  XSSFRow row = this.getRow(sheet, 0);
  XSSFCell cell = this.getCell(row, column);
  cell.setCellValue(title);
  this.updateSheetTable(sheet.getTables().get(0).getCTTable(), title, column);
  return new CellReference(sheet.getSheetName(), 0, column, true, true);
}

代码示例来源:origin: org.apache.poi/poi-ooxml

XSSFTable table = rp.getDocumentPart();
tbl.setId(rp.getRelationship().getId());
table.getCTTable().setId(tableNumber);

代码示例来源:origin: org.apache.poi/poi-ooxml

CTTableColumns ctTableColumns = getCTTable().getTableColumns();
if(ctTableColumns != null) {
  for (CTTableColumn col : ctTableColumns.getTableColumnList()) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Remove table references and relations
 * @param t table to remove
 */
public void removeTable(XSSFTable t) {
  long id = t.getCTTable().getId();
  Map.Entry<String, XSSFTable> toDelete = null;
  for (Map.Entry<String, XSSFTable> entry : tables.entrySet()) {
    if (entry.getValue().getCTTable().getId() == id) toDelete = entry;
  }
  if (toDelete != null) {
    removeRelation(getRelationById(toDelete.getKey()), true);
    tables.remove(toDelete.getKey());
    toDelete.getValue().onTableDelete();
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * set sheet title in excel file
 *
 * @param title
 *            title of sheet
 * @param column
 *            column index
 * @return return cell reference
 * @since POI 4.0.0
 */
public CellReference setSheetTitle(String title, int column) {
  XSSFSheet sheet = getSheet();
  XSSFRow row = this.getRow(sheet, 0);
  XSSFCell cell = this.getCell(row, column);
  cell.setCellValue(title);
  this.updateSheetTable(sheet.getTables().get(0).getCTTable(), title, column);
  return new CellReference(sheet.getSheetName(), 0, column, true, true);
}

代码示例来源:origin: stackoverflow.com

CTTable cttable = my_table.getCTTable();

代码示例来源:origin: org.apache.poi/poi-examples

table.getCTTable().addNewTableStyleInfo();
table.getCTTable().getTableStyleInfo().setName("TableStyleMedium2");

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

XSSFTable table = rp.getDocumentPart();
tbl.setId(rp.getRelationship().getId());
table.getCTTable().setId(tableNumber);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

CTTableColumns ctTableColumns = getCTTable().getTableColumns();
if(ctTableColumns != null) {
  for (CTTableColumn col : ctTableColumns.getTableColumnList()) {

代码示例来源:origin: stackoverflow.com

CTTable cttable = table.getCTTable();
table.setDisplayName("table");
cttable.setRef("A1:C4");

代码示例来源:origin: stackoverflow.com

XSSFTable table = sheet.createTable();
table.setDisplayName(name);
CTTable cttable = table.getCTTable();

相关文章