Class ExcelRowStream

java.lang.Object
io.github.connellite.excel.ExcelRowStream

public final class ExcelRowStream extends Object
Builds a sequential Stream over sheet rows. Close the stream (for example with try-with-resources) to run AutoCloseable.close() on the underlying iterator, which closes the Workbook.
  • Method Details

    • stream

      public static Stream<Map<String,Object>> stream(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName)
      Opens a forward-only, ordered stream of rows as Map<String, Object> (see ExcelRowIterator).
      Parameters:
      workbook - workbook to read from; closed when the stream is closed
      sheetName - sheet name
      Returns:
      a non-parallel stream
    • streamStrings

      public static Stream<Map<String,String>> streamStrings(org.apache.poi.ss.usermodel.Workbook workbook, String sheetName)
      Opens a forward-only, ordered stream of rows as Map<String, String> (see ExcelRowStringIterator).
      Parameters:
      workbook - workbook to read from; closed when the stream is closed
      sheetName - sheet name
      Returns:
      a non-parallel stream