本文整理了Java中org.apache.poi.ss.usermodel.Sheet.setDefaultRowHeightInPoints()
方法的一些代码示例,展示了Sheet.setDefaultRowHeightInPoints()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Sheet.setDefaultRowHeightInPoints()
方法的具体详情如下:
包路径:org.apache.poi.ss.usermodel.Sheet
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!