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

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

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

HSSFWorkbook.setMissingCellPolicy介绍

[英]Sets the policy on what to do when getting missing or blank cells from a row. This will then apply to all calls to HSSFRow#getCell(int)}. See MissingCellPolicy. Note that this has no effect on any iterators, only on when fetching Cells by their column index.
[中]

代码示例

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

_wb.setMissingCellPolicy(MissingCellPolicy.RETURN_BLANK_AS_NULL);

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

HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(inputFile));
workbook.setMissingCellPolicy(Row.CREATE_NULL_AS_BLANK);

HSSFSheet sheet = workbook.getSheetAt(0);
for(int rowIndex = sheet.getFirstRowNum(); rowIndex < sheet.getLastRowNum(); rowIndex++)
{
    Cell cell=null;
    Row row = null;

    previousCell = -1;
    currentCell = 0;
    row = sheet.getRow(rowIndex);
    for(int colIndex=row.getFirstCellNum(); colIndex < row.getLastCellNum(); colIndex++)
      {
         cell = row.getCell(colIndex);
         currentCell = cell.getColumnIndex();

         /* Cell processing starts here*/
      }
  }

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

_wb.setMissingCellPolicy(HSSFRow.RETURN_BLANK_AS_NULL);

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

_wb.setMissingCellPolicy(MissingCellPolicy.RETURN_BLANK_AS_NULL);

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

_wb.setMissingCellPolicy(HSSFRow.RETURN_BLANK_AS_NULL);

相关文章

HSSFWorkbook类方法