(add-rows! sheet rows)
Add rows to the sheet. The rows is a sequence of row-data, where each row-data is a sequence of values for the columns in increasing order on that row.
Add rows to the sheet. The rows is a sequence of row-data, where each row-data is a sequence of values for the columns in increasing order on that row.
(add-sheet! workbook name)
Add a new sheet to the workbook.
Add a new sheet to the workbook.
Return a seq of the cells in the input which can be a sheet, a row, or a collection of one of these. The seq is ordered ordered by sheet, row and column.
Return a seq of the cells in the input which can be a sheet, a row, or a collection of one of these. The seq is ordered ordered by sheet, row and column.
(create-cell-style! workbook)
(create-cell-style! workbook styles)
Create a new cell-style. Options is a map with the cell style configuration:
:background the name of the background colour (as keyword)
Valid keywords are the colour names defined in org.apache.ss.usermodel.IndexedColors as lowercase keywords, eg.
:black, :white, :red, :blue, :green, :yellow, ...
Example:
(create-cell-style! wb {:background :yellow})
Create a new cell-style. Options is a map with the cell style configuration: :background the name of the background colour (as keyword) Valid keywords are the colour names defined in org.apache.ss.usermodel.IndexedColors as lowercase keywords, eg. :black, :white, :red, :blue, :green, :yellow, ... Example: (create-cell-style! wb {:background :yellow})
(create-font! workbook options)
Create a new font in the workbook. Options are :bold true/false bold or normal font
Example: (create-font! wb {:bold true})
Create a new font in the workbook. Options are :bold true/false bold or normal font Example: (create-font! wb {:bold true})
(create-workbook sheet-name data)
Create a new workbook with a single sheet and the data specified. The data is given a vector of vectors, representing the rows and the cells of the rows.
For example, to create a workbook with a sheet with two rows of each three columns:
(create-workbook "Sheet 1" [["Name" "Quantity" "Price"] ["Foo Widget" 2 42]])
Create a new workbook with a single sheet and the data specified. The data is given a vector of vectors, representing the rows and the cells of the rows. For example, to create a workbook with a sheet with two rows of each three columns: (create-workbook "Sheet 1" [["Name" "Quantity" "Price"] ["Foo Widget" 2 42]])
(get-row-styles row)
Returns a seq of the row's CellStyles.
Returns a seq of the row's CellStyles.
(load-workbook filename)
Load an Excel .xls or .xlsx workbook from a file.
Load an Excel .xls or .xlsx workbook from a file.
(remove-all-rows! sheet)
Remove all the rows from the sheet.
Remove all the rows from the sheet.
(remove-row! sheet row)
Remove a row from the sheet.
Remove a row from the sheet.
(row-seq sheet)
Return a lazy sequence of the rows in a sheet.
Return a lazy sequence of the rows in a sheet.
(row-vec column-order row)
Transform the row struct (hash-map) to a row vector according to the column order. Example:
(row-vec [:foo :bar] {:foo "Foo text", :bar "Bar text"}) > ["Foo text" "Bar text"]
Transform the row struct (hash-map) to a row vector according to the column order. Example: (row-vec [:foo :bar] {:foo "Foo text", :bar "Bar text"}) > ["Foo text" "Bar text"]
(save-workbook! filename workbook)
Save the workbook into a file.
Save the workbook into a file.
(select-columns column-map sheet)
Takes two arguments: column hashmap where the keys are the spreadsheet column names as keys and the values represent the names they are mapped to, and a sheet.
For example, to select columns A and C as :first and :third from the sheet (select-columns {:A :first, :C :third} sheet) => [{:first "Value in cell A1", :third "Value in cell C1"} ...]
Takes two arguments: column hashmap where the keys are the spreadsheet column names as keys and the values represent the names they are mapped to, and a sheet. For example, to select columns A and C as :first and :third from the sheet (select-columns {:A :first, :C :third} sheet) => [{:first "Value in cell A1", :third "Value in cell C1"} ...]
(select-name workbook n)
Given a workbook and name (string or keyword) of a named range, select-name returns a seq of cells or nil if the name could not be found.
Given a workbook and name (string or keyword) of a named range, select-name returns a seq of cells or nil if the name could not be found.
(select-sheet name workbook)
Select a sheet from the workbook by name.
Select a sheet from the workbook by name.
(set-cell-style! cell style)
Apply a style to a cell. See also: create-cell-style!.
Apply a style to a cell. See also: create-cell-style!.
(set-row-style! row style)
Apply a style to all the cells in a row. Returns the row.
Apply a style to all the cells in a row. Returns the row.
(set-row-styles! row styles)
Apply a seq of styles to the cells in a row.
Apply a seq of styles to the cells in a row.
(sheet-name sheet)
Return the name of a sheet.
Return the name of a sheet.
(sheet-seq workbook)
Return a lazy seq of the sheets in a workbook.
Return a lazy seq of the sheets in a workbook.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close