2 Read
read from a .xlsx file.
you can get a specific cell’s value or loop for the whole sheet’s rows.
(require simple-xlsx) | package: simple-xlsx |
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?)
read xlsx’s main outer func, all read assosiated action is include in user-proc.
procedure
(load-sheet sheet_name xlsx_handler) → void?
sheet_name : (string?) xlsx_handler : (xlsx_handler)
load specified sheet by sheet name.
must first called before other func, because any other func is based on specified sheet.
must first called before other func, because any other func is based on specified sheet.
procedure
(get-sheet-names xlsx_handler) → list?
xlsx_handler : (xlsx_handler)
get sheet names.
procedure
(get-cell-value cell_axis xlsx_handler) → any
cell_axis : (string?) xlsx_handler : (xlsx_handler)
get cell value through cell’s axis.
cell axis: A1 B2 C3...
cell axis: A1 B2 C3...
procedure
(get-sheet-dimension xlsx_handler) → string?
xlsx_handler : (xlsx_handler)
get current sheet’s dimension.
like A1:C5
like A1:C5
with-row is like for-each, deal a line one time.