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

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

本文整理了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

  1. /**
  2. * Applies a whole-row cell styling to the row.
  3. * The row style can be cleared by passing in <code>null</code>.
  4. */
  5. @Override
  6. public void setRowStyle(CellStyle style) {
  7. if(style == null) {
  8. _style = -1;
  9. } else {
  10. _style = style.getIndex();
  11. }
  12. }

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

  1. /**
  2. * Sets the default column style for a given column. POI will only apply this style to new cells added to the sheet.
  3. *
  4. * @param column the column index
  5. * @param style the style to set
  6. */
  7. @Override
  8. public void setDefaultColumnStyle(int column, CellStyle style) {
  9. _sheet.setDefaultColumnStyle(column, style.getIndex());
  10. }

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

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

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

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

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

  1. /**
  2. * Applies a whole-row cell styling to the row.
  3. */
  4. public void setRowStyle(CellStyle style) {
  5. if(style == null) {
  6. _style = -1;
  7. return;
  8. } else {
  9. _style = style.getIndex();
  10. }
  11. }

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

  1. /**
  2. * Applies a whole-row cell styling to the row.
  3. * The row style can be cleared by passing in <code>null</code>.
  4. */
  5. @Override
  6. public void setRowStyle(CellStyle style) {
  7. if(style == null) {
  8. _style = -1;
  9. } else {
  10. _style = style.getIndex();
  11. }
  12. }

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

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

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

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

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

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

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

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

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

  1. private String styleName(CellStyle style) {
  2. if (style == null) {
  3. return "";
  4. }
  5. return String.format("style_%02x_%s font_%s_%s", style.getIndex(), cssRandom,
  6. style.getFontIndex(), cssRandom);
  7. }
  8. }

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

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

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

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

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

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

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

  1. /**
  2. * Sets the default column style for a given column. POI will only apply this style to new cells added to the sheet.
  3. *
  4. * @param column the column index
  5. * @param style the style to set
  6. */
  7. @Override
  8. public void setDefaultColumnStyle(int column, CellStyle style) {
  9. _sheet.setDefaultColumnStyle(column, style.getIndex());
  10. }

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

  1. private String styleName(CellStyle style) {
  2. if (style == null) {
  3. style = wb.getCellStyleAt((short) 0);
  4. }
  5. StringBuilder sb = new StringBuilder();
  6. try (Formatter fmt = new Formatter(sb)) {
  7. fmt.format("style_%02x", style.getIndex());
  8. return fmt.toString();
  9. }
  10. }

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

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

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

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

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

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

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

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

相关文章