2 Read
(require simple-xlsx) | package: simple-xlsx |
read from a .xlsx file.
you can get a specific cell’s value or loop for the whole sheet’s rows.
there is also a complete read and write example on github:includedin the source.
procedure
(with-input-from-xlsx-file xlsx_file_path user-proc) → void? xlsx_file_path : (path-string?) user-proc : (-> xlsx_handler void?)
procedure
(load-sheet sheet_name xlsx_handler) → void?
sheet_name : (string?) xlsx_handler : (xlsx_handler)
procedure
(get-sheet-names xlsx_handler) → list?
xlsx_handler : (xlsx_handler)
procedure
(get-cell-value cell_axis xlsx_handler) → any
cell_axis : (string?) xlsx_handler : (xlsx_handler)
procedure
(get-cell-formula cell_axis xlsx_handler) → string?
cell_axis : (string?) xlsx_handler : (xlsx_handler)
Limitations: currently does not support array or shared formulae
cell axis: A1 B2 C3...
procedure
(oa_date_number->date oa_date_number) → date?
oa_date_number : (number?)
this function can convert number to a date? with precision to day only, the hour, minute and seconds set to 0.
(oa_date_number->date 43359.1212121) to a date is 2018-9-16 00:00:00.
procedure
(get-sheet-dimension xlsx_handler) → pair?
xlsx_handler : (xlsx_handler)
procedure
(get-sheet-rows xlsx_handler) → list?
xlsx_handler : (xlsx_handler)
procedure
(sheet-name-rows xlsx_file_path sheet_name) → list?
xlsx_file_path : (path-string?) sheet_name : (string?)
this is the most simple func to get xlsx data.
procedure
(sheet-ref-rows xlsx_file_path sheet_index) → list?
xlsx_file_path : (path-string?) sheet_index : (exact-nonnegative-integer?)