-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend xlsx_reader to include formulas (#22)
Add cell_data_format option to return data as Cell structs instead of values This provides access to cell formulas.
- Loading branch information
Showing
5 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
defmodule XlsxReader.Cell do | ||
@moduledoc """ | ||
Cell structure. | ||
This structure contains the information of a cell in a sheet. | ||
- `value` - The value of the cell | ||
- `formula` - The formula used in the cell, if any | ||
- `ref` - The cell reference, like 'A1', 'B2', etc. | ||
This structure is used when the `cell_data_format` option is set to `:cell`. | ||
""" | ||
|
||
defstruct [:value, :formula, :ref] | ||
|
||
@typedoc """ | ||
XLSX cell data | ||
""" | ||
@type t :: %__MODULE__{ | ||
value: term(), | ||
formula: String.t() | nil, | ||
ref: String.t() | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters