elixlsx v0.3.1 Elixlsx.Util
Summary
Functions
Returns the application version suitable for the
returns the column index associated with a given letter
returns the column letter(s) associated with a column index. Col idx starts at 1
returns a tuple {row, col} corresponding to the input. row and col are 1-indexed, use from_excel_coords0 for zero-indexing
See from_excel_coords/1
Returns the ISO String representation (in UTC) for a erlang datetime() or datetime1970() object
returns
replace_all(input, [{search, replace}])
Returns the Char/Number representation of a given row/column combination. Indizes start with 1
Formula’s value calculate on opening excel programm. We don’t need to format this here
Types
Functions
returns the column index associated with a given letter.
Example
iex> decode_col("AB")
28
iex> decode_col("A")
1
returns the column letter(s) associated with a column index. Col idx starts at 1.
Example
iex> encode_col(1)
"A"
iex> encode_col(28)
"AB"
returns a tuple {row, col} corresponding to the input. row and col are 1-indexed, use from_excel_coords0 for zero-indexing.
Example:
iex> from_excel_coords("C2")
{2, 3}
iex> from_excel_coords0("C2")
{1, 2}
See from_excel_coords/1
Returns the ISO String representation (in UTC) for a erlang datetime() or datetime1970() object.
Example
iex> iso_from_datetime {{2000, 12, 30}, {23, 59, 59}}
"2000-12-30T23:59:59Z"
returns
- the current current timestamp if input is nil,
- the UNIX-Timestamp interpretation when given an integer,
both in ISO-Repr.
If input is a String, the string is returned.
iex> iso_timestamp 0
"1970-01-01T00:00:00Z"
iex> iso_timestamp 1447885907
"2015-11-18T22:31:47Z"
It doesn’t validate string inputs though:
iex> iso_timestamp "goat"
"goat"
replace_all(input, [{search, replace}])
Example
iex> replace_all("Hello World", [{"e", "E"}, {"o", "oO"}])
"HElloO WoOrld"
Returns the Char/Number representation of a given row/column combination. Indizes start with 1.
Examples
iex> to_excel_coords(1, 1)
"A1"
iex> to_excel_coords(10, 27)
"AA10"
to_excel_datetime(datetime_t) :: {:excelts, number}
to_excel_datetime(number) :: {:excelts, number}
to_excel_datetime({:excelts, number}) :: {:excelts, number}
to_excel_datetime({:formula, String.t}) :: {:formula, String.t}
Formula’s value calculate on opening excel programm. We don’t need to format this here.