ontodev.excel
cell-value
(cell-value cell)
(cell-value cell cell-type)
Return cell-value based on proper getter based on cell-value
cell-value-fn
(cell-value-fn opt workbook)
Return function to determine Excel cell values based on given options. opt - cmdline options. workbook - the Excel workbook object, used to create the function. if --values values
is given, use the underlying values. if --values formatted
is given, use the cells as formatted (visbly) in the excel sheet. The returned function should accept 1 or 2 arguments: the first is the cell, the optional second is the cell-type.
cell-value-formatted
(cell-value-formatted evaluator data-formatter cell)
(cell-value-formatted evaluator data-formatter cell cell-type)
Return cell-value based on proper getter based on cell-value. Some Excel functions are not implemented (eg GETPIVOTDATA), fallback to cell-value
cell-value-numeric
(cell-value-numeric cell)
Return numeric cell-value, could be a date/time
get-cell-string-value
(get-cell-string-value cell)
(get-cell-string-value cell cell-type)
Get the value of a cell as a string, by changing the cell type to ‘string’ and then changing it back. optional cell-type is not used here.
int-value?
(int-value? v)
Return true iff the actual value is an integer. Datatype could be a float/double
read-row
(read-row row)
(read-row cell-value-fn row)
Read all the cells in a row (including blanks) and return a list of values.
read-sheet
(read-sheet workbook)
(read-sheet opt workbook)
(read-sheet opt workbook sheet-name)
(read-sheet opt workbook sheet-name n-header-rows)
Given a workbook with an optional sheet name (default is ‘Sheet1’) and and optional header row number (default is ‘1’), return the data in the sheet as a vector of maps using the headers from the header row as the keys. Use :values key in opt (map) to determine how to determine the values: :strings - the default, all values are returned as strings :values - the actual values with correct datatype, including dates/times based on cell-formatting :formatted - the formatted values
sheet-headers
(sheet-headers workbook sheet-name)
Returns the headers (in their original forms, not as keywords) for a given sheet.