org.apache.poi.hssf.usermodel.HSSFSheet.showInPane()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(155)

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

HSSFSheet.showInPane介绍

[英]Sets desktop window pane display area, when the file is first opened in a viewer.
[中]当文件首次在查看器中打开时,设置桌面窗格显示区域。

代码示例

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

/**
 * Sets desktop window pane display area, when the
 * file is first opened in a viewer.
 *
 * @param toprow  the top row to show in desktop window pane
 * @param leftcol the left column to show in desktop window pane
 */
@Override
public void showInPane(int toprow, int leftcol) {
  int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex();
  if (toprow > maxrow) throw new IllegalArgumentException("Maximum row number is " + maxrow);
  
  showInPane((short)toprow, (short)leftcol);
}
/**

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

/**
 * Sets desktop window pane display area, when the
 * file is first opened in a viewer.
 *
 * @param toprow  the top row to show in desktop window pane
 * @param leftcol the left column to show in desktop window pane
 */
@Override
public void showInPane(int toprow, int leftcol) {
  int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex();
  if (toprow > maxrow) throw new IllegalArgumentException("Maximum row number is " + maxrow);
  
  showInPane((short)toprow, (short)leftcol);
}
/**

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

HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file));
 HSSFSheet s = wb.getSheetAt(0);
 wb.setActiveSheet(0);
 s.showInPane(0, 0);
 FileOutputStream out = new FileOutputStream(file);
 wb.write(out);
 out.close();

相关文章

微信公众号

最新文章

更多

HSSFSheet类方法