Skip to content

Commit

Permalink
Add sheetNames to WorkbookReader
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpade-zmi authored and nightscape committed Jan 27, 2020
1 parent 0bef78f commit 21b440f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ trait WorkbookReader {
workbook.close()
res
}
def sheetNames: Seq[String] = {
withWorkbook(workbook =>
for (sheetIx <- (0 until workbook.getNumberOfSheets())) yield {
workbook.getSheetAt(sheetIx).getSheetName()
}
)
}
}

object WorkbookReader {
Expand Down

0 comments on commit 21b440f

Please sign in to comment.