tech.v3.libs.fastexcel

Parse a dataset in xlsx format. This namespace auto-registers a handler for the 'xlsx' file type so that when using ->dataset, xlsx will automatically map to (first (workbook->datasets)).

Note that this namespace does not auto-register a handler for the xls file type. xls is handled by the poi namespace.

If you have an xlsx file that contains multiple sheets and you want a dataset out of each sheet you have to use workbook->datasets as opposed to the higher level ->dataset operator.

This dependency has a known conflict with cognitec's aws library - see issue 283.

Required Dependencies:

  [org.dhatim/fastexcel-reader "0.12.8" :exclusions [org.apache.poi/poi-ooxml]]

input->workbook

(input->workbook input)(input->workbook input _options)

Given an input data source, return an implementation of tech.v3.dataset/Spreadsheet$Workbook. This interface allows you to iterate through sheets without necessarily parsing them. Once you have a spreadsheet, use tech.v3.dataset.io.spreadsheet/sheet->dataset to get a dataset.

workbook->datasets

(workbook->datasets input options)(workbook->datasets input)

Given a workbook, an string filename or an input stream return a sequence of dataset named after the sheets.

Options are a subset of the arguments for tech.v3.dataset/->dataset:

  • :header-row?
  • :num-rows
  • :n-initial-skip-rows
  • :parser-fn