org.apache.poi.ss.usermodel.CellStyle.getIndex()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(205)

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

CellStyle.getIndex介绍

[英]get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
[中]获取工作簿中的索引(ExtnededFormat对象集合中的顺序)

代码示例

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

/**
 * Applies a whole-row cell styling to the row.
 * The row style can be cleared by passing in <code>null</code>.
 */
@Override
public void setRowStyle(CellStyle style) {
  if(style == null) {
   _style = -1;
  } else {
   _style = style.getIndex();
  }
}

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

/**
 * Sets the default column style for a given column.  POI will only apply this style to new cells added to the sheet.
 *
 * @param column the column index
 * @param style  the style to set
 */
@Override
public void setDefaultColumnStyle(int column, CellStyle style) {
  _sheet.setDefaultColumnStyle(column, style.getIndex());
}

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

public void setColDefaultStyle(long index, CellStyle style) {
  setColDefaultStyle(index, style.getIndex());
}

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

writeAttribute("r", ref);
CellStyle cellStyle = cell.getCellStyle();
if (cellStyle.getIndex() != 0) {
  writeAttribute("s", Integer.toString(cellStyle.getIndex() & 0xffff));

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Applies a whole-row cell styling to the row.
 */
public void setRowStyle(CellStyle style) {
  if(style == null) {
   _style = -1;
   return;
  } else {
   _style = style.getIndex();
  }
}

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

/**
 * Applies a whole-row cell styling to the row.
 * The row style can be cleared by passing in <code>null</code>.
 */
@Override
public void setRowStyle(CellStyle style) {
  if(style == null) {
   _style = -1;
  } else {
   _style = style.getIndex();
  }
}

代码示例来源:origin: xiaolanglang/easypoi

private String styleName(CellStyle style) {
  if (style == null)
    return "";
  return String.format("style_%02x_%s", style.getIndex(), cssRandom);
}

代码示例来源:origin: org.jeecg/easypoi-base

private String styleName(CellStyle style) {
  if (style == null)
    return "";
  return String.format("style_%02x_%s", style.getIndex(), cssRandom);
}

代码示例来源:origin: cn.afterturn/easypoi-base

private String styleName(CellStyle style) {
  if (style == null) {
    return "";
  }
  return String.format("style_%02x_%s", style.getIndex(), cssRandom);
}

代码示例来源:origin: zhangdaiscott/jeasypoi

private String styleName(CellStyle style) {
  if (style == null)
    return "";
  return String.format("style_%02x_%s", style.getIndex(), cssRandom);
}

代码示例来源:origin: cn.afterturn/easypoi-base

private String styleName(CellStyle style) {
    if (style == null) {
      return "";
    }
    return String.format("style_%02x_%s font_%s_%s", style.getIndex(), cssRandom,
        style.getFontIndex(), cssRandom);
  }
}

代码示例来源:origin: zhangdaiscott/jeasypoi

private String styleName(CellStyle style) {
    if (style == null)
      return "";
    return String.format("style_%02x_%s font_%s_%s", style.getIndex(), cssRandom, style.getFontIndex(), cssRandom);
  }
}

代码示例来源:origin: xiaolanglang/easypoi

private String styleName(CellStyle style) {
    if (style == null)
      return "";
    return String.format("style_%02x_%s font_%s_%s", style.getIndex(), cssRandom,
      style.getFontIndex(), cssRandom);
  }
}

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

public void setColDefaultStyle(long index, CellStyle style) {
  setColDefaultStyle(index, style.getIndex());
}

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

/**
 * Sets the default column style for a given column.  POI will only apply this style to new cells added to the sheet.
 *
 * @param column the column index
 * @param style  the style to set
 */
@Override
public void setDefaultColumnStyle(int column, CellStyle style) {
  _sheet.setDefaultColumnStyle(column, style.getIndex());
}

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

private String styleName(CellStyle style) {
  if (style == null) {
    style = wb.getCellStyleAt((short) 0);
  }
  StringBuilder sb = new StringBuilder();
  try (Formatter fmt = new Formatter(sb)) {
    fmt.format("style_%02x", style.getIndex());
    return fmt.toString();
  }
}

代码示例来源:origin: org.jeecg/easypoi-base

private String styleName(CellStyle style) {
    if (style == null)
      return "";
    return String.format("style_%02x_%s font_%s_%s", style.getIndex(), cssRandom,
      style.getFontIndex(), cssRandom);
  }
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

public void setColDefaultStyle(long index, CellStyle style) {
  setColDefaultStyle(index, style.getIndex());
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

_out.write("<c r=\"" + ref + "\"");
CellStyle cellStyle = cell.getCellStyle();
if (cellStyle.getIndex() != 0) _out.write(" s=\"" + cellStyle.getIndex() + "\"");
int cellType = cell.getCellType();
switch (cellType) {

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

cTCol.setMax(16384);
cTCol.setWidth(12.7109375);
cTCol.setStyle(style.getIndex());

相关文章

微信公众号

最新文章

更多