View Source XlsxReader.Styles (xlsx_reader v0.8.6)
Utility functions and types to deal with cell styles
Summary
Types
Matches the text representation of a cell value
Knwon cell styles for which type conversion is supported
Cell styles for which type conversion is supported
Functions
Guesses the type of a cell based on its style.
Types
Matches the text representation of a cell value
@type known_style_type() ::
:string | :number | :percentage | :date | :time | :date_time | :unsupported
Knwon cell styles for which type conversion is supported
@type style_type() :: known_style_type() | String.t()
Cell styles for which type conversion is supported
@type style_types() :: XlsxReader.Array.t(style_type())
@type supported_custom_formats() :: [{custom_format_matcher(), known_style_type()}]
Functions
Link to this function
get_style_type(num_fmt_id, custom_formats \\ %{}, supported_custom_formats \\ [])
View Source@spec get_style_type(String.t(), custom_formats(), supported_custom_formats()) :: style_type() | nil
Guesses the type of a cell based on its style.
The type is:
- looked-up from a list of "standard" styles, or
- guessed from a list of default supported custom formats, or
- guessed from a list of user-provided supported custom formats.
If no type could be guessed, returns nil
.