本文整理了Java中org.apache.poi.hssf.usermodel.HSSFSheet.setZoom()
方法的一些代码示例,展示了HSSFSheet.setZoom()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFSheet.setZoom()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFSheet
类名称:HSSFSheet
方法名:setZoom
[英]Window zoom magnification for current view representing percent values. Valid values range from 10 to 400. Horizontal & Vertical scale together. For example:
10 - 10%
20 - 20%
...
100 - 100%
...
400 - 400%
[中]当前视图的窗口缩放比例,表示百分比值。有效值范围为10到400。水平和垂直比例在一起。例如:
10 - 10%
20 - 20%
...
100 - 100%
...
400 - 400%
代码示例来源:origin: org.apache.poi/poi
/**
* Window zoom magnification for current view representing percent values.
* Valid values range from 10 to 400. Horizontal & Vertical scale together.
*
* For example:
* <pre>
* 10 - 10%
* 20 - 20%
* ...
* 100 - 100%
* ...
* 400 - 400%
* </pre>
*
* @param scale window zoom magnification
* @throws IllegalArgumentException if scale is invalid
*/
@Override
public void setZoom(int scale) {
setZoom(scale, 100);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Window zoom magnification for current view representing percent values.
* Valid values range from 10 to 400. Horizontal & Vertical scale together.
*
* For example:
* <pre>
* 10 - 10%
* 20 - 20%
* ...
* 100 - 100%
* ...
* 400 - 400%
* </pre>
*
* @param scale window zoom magnification
* @throws IllegalArgumentException if scale is invalid
*/
@Override
public void setZoom(int scale) {
setZoom(scale, 100);
}
代码示例来源:origin: org.apache.poi/poi-examples
public static void main(String[] args) throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sheet1 = wb.createSheet("new sheet");
sheet1.setZoom(75); // 75 percent magnification
try (FileOutputStream fileOut = new FileOutputStream("workbook.xls")) {
wb.write(fileOut);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!