org.apache.poi.ss.usermodel.Row.iterator()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(98)

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

Row.iterator介绍

暂无

代码示例

代码示例来源:origin: com.ksc.mission.base/file

@Override
public String[] next() {
  Row currentRow = iterator.next();
  Iterator<Cell> cellIterator = currentRow.iterator();
  ArrayList<String> result = new ArrayList<String>();
  while (cellIterator.hasNext()) 
    result.add(cellIterator.next().getStringCellValue());    
  return (String[])result.toArray();
}

代码示例来源:origin: codingchili/excelastic

/**
 * Returns the number of columns present on the given row.
 *
 * @param row the row to read column count from.
 * @return the number of columns on the given row
 */
private int getColumnCount(Row row) {
  DataFormatter formatter = new DataFormatter();
  Iterator<Cell> iterator = row.iterator();
  int count = 0;
  while (iterator.hasNext()) {
    Cell cell = iterator.next();
    String value = formatter.formatCellValue(cell);
    if (value.length() > 0) {
      count++;
    } else {
      break;
    }
  }
  return count;
}

代码示例来源:origin: com.blackducksoftware.tools/common-framework

Row actualRow = actualRowIter.next();
Iterator<Cell> expectedCellIter = expectedRow.iterator();
Iterator<Cell> actualCellIter = actualRow.iterator();

相关文章