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

x33g5p2x  于2022-01-29 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(119)

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

Sheet.setDefaultRowHeightInPoints介绍

[英]Set the default row height for the sheet (if the rows do not define their own height) in points
[中]以点为单位设置图纸的默认行高(如果行未定义自己的高度)

代码示例

代码示例来源:origin: looly/hutool

/**
 * 设置行高,值为一个点的高度
 * 
 * @param rownum 行号(从0开始计数,-1表示所有行的默认高度)
 * @param height 高度
 * @return this
 * @since 4.0.8
 */
public ExcelWriter setRowHeight(int rownum, int height) {
  if (rownum < 0) {
    this.sheet.setDefaultRowHeightInPoints(height);
  } else {
    this.sheet.getRow(rownum).setHeightInPoints(height);
  }
  return this;
}

代码示例来源:origin: looly/hutool

/**
 * 设置行高,值为一个点的高度
 * 
 * @param rownum 行号(从0开始计数,-1表示所有行的默认高度)
 * @param height 高度
 * @return this
 * @since 4.0.8
 */
public ExcelWriter setRowHeight(int rownum, int height) {
  if (rownum < 0) {
    this.sheet.setDefaultRowHeightInPoints(height);
  } else {
    this.sheet.getRow(rownum).setHeightInPoints(height);
  }
  return this;
}

代码示例来源:origin: Vatavuk/excel-io

@Override
  public void accept(final Sheet sheet) {
    sheet.setDefaultRowHeightInPoints(this.value);
  }
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * 设置行高,值为一个点的高度
 * 
 * @param rownum 行号(从0开始计数,-1表示所有行的默认高度)
 * @param height 高度
 * @return this
 * @since 4.0.8
 */
public ExcelWriter setRowHeight(int rownum, int height) {
  if (rownum < 0) {
    this.sheet.setDefaultRowHeightInPoints(height);
  } else {
    this.sheet.getRow(rownum).setHeightInPoints(height);
  }
  return this;
}

相关文章

微信公众号

最新文章

更多