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

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

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

HSSFWorkbook.setPrintArea介绍

[英]For the Convenience of Java Programmers maintaining pointers.
[中]为了方便Java程序员维护指针。

代码示例

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

  1. /**
  2. * For the Convenience of Java Programmers maintaining pointers.
  3. * @see #setPrintArea(int, String)
  4. * @param sheetIndex Zero-based sheet index (0 = First Sheet)
  5. * @param startColumn Column to begin printarea
  6. * @param endColumn Column to end the printarea
  7. * @param startRow Row to begin the printarea
  8. * @param endRow Row to end the printarea
  9. */
  10. @Override
  11. public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
  12. int startRow, int endRow) {
  13. //using absolute references because they don't get copied and pasted anyway
  14. CellReference cell = new CellReference(startRow, startColumn, true, true);
  15. String reference = cell.formatAsString();
  16. cell = new CellReference(endRow, endColumn, true, true);
  17. reference = reference+":"+cell.formatAsString();
  18. setPrintArea(sheetIndex, reference);
  19. }

代码示例来源:origin: com.haulmont.thirdparty/poi

  1. /**
  2. * For the Convenience of Java Programmers maintaining pointers.
  3. * @see #setPrintArea(int, String)
  4. * @param sheetIndex Zero-based sheet index (0 = First Sheet)
  5. * @param startColumn Column to begin printarea
  6. * @param endColumn Column to end the printarea
  7. * @param startRow Row to begin the printarea
  8. * @param endRow Row to end the printarea
  9. */
  10. public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
  11. int startRow, int endRow) {
  12. //using absolute references because they don't get copied and pasted anyway
  13. CellReference cell = new CellReference(startRow, startColumn, true, true);
  14. String reference = cell.formatAsString();
  15. cell = new CellReference(endRow, endColumn, true, true);
  16. reference = reference+":"+cell.formatAsString();
  17. setPrintArea(sheetIndex, reference);
  18. }

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

  1. /**
  2. * For the Convenience of Java Programmers maintaining pointers.
  3. * @see #setPrintArea(int, String)
  4. * @param sheetIndex Zero-based sheet index (0 = First Sheet)
  5. * @param startColumn Column to begin printarea
  6. * @param endColumn Column to end the printarea
  7. * @param startRow Row to begin the printarea
  8. * @param endRow Row to end the printarea
  9. */
  10. public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
  11. int startRow, int endRow) {
  12. //using absolute references because they don't get copied and pasted anyway
  13. CellReference cell = new CellReference(startRow, startColumn, true, true);
  14. String reference = cell.formatAsString();
  15. cell = new CellReference(endRow, endColumn, true, true);
  16. reference = reference+":"+cell.formatAsString();
  17. setPrintArea(sheetIndex, reference);
  18. }

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

  1. /**
  2. * For the Convenience of Java Programmers maintaining pointers.
  3. * @see #setPrintArea(int, String)
  4. * @param sheetIndex Zero-based sheet index (0 = First Sheet)
  5. * @param startColumn Column to begin printarea
  6. * @param endColumn Column to end the printarea
  7. * @param startRow Row to begin the printarea
  8. * @param endRow Row to end the printarea
  9. */
  10. @Override
  11. public void setPrintArea(int sheetIndex, int startColumn, int endColumn,
  12. int startRow, int endRow) {
  13. //using absolute references because they don't get copied and pasted anyway
  14. CellReference cell = new CellReference(startRow, startColumn, true, true);
  15. String reference = cell.formatAsString();
  16. cell = new CellReference(endRow, endColumn, true, true);
  17. reference = reference+":"+cell.formatAsString();
  18. setPrintArea(sheetIndex, reference);
  19. }

代码示例来源:origin: org.onap.portal.sdk/epsdk-analytics

  1. wb.setPrintArea(
  2. 0, //sheet index
  3. 0, //start column

相关文章

HSSFWorkbook类方法