# `XlsxReader.Styles`
[🔗](https://github.com/xavier/xlsx_reader/blob/main/lib/xlsx_reader/styles.ex#L1)

Utility functions and types to deal with cell styles

# `custom_format_matcher`

```elixir
@type custom_format_matcher() :: String.t() | Regex.t()
```

Matches the text representation of a cell value

# `custom_formats`

```elixir
@type custom_formats() :: %{optional(String.t()) =&gt; String.t()}
```

# `known_style_type`

```elixir
@type known_style_type() ::
  :string | :number | :percentage | :date | :time | :date_time | :unsupported
```

Knwon cell styles for which type conversion is supported

# `style_type`

```elixir
@type style_type() :: known_style_type() | String.t()
```

Cell styles for which type conversion is supported

# `style_types`

```elixir
@type style_types() :: XlsxReader.Array.t(style_type())
```

# `supported_custom_formats`

```elixir
@type supported_custom_formats() :: [{custom_format_matcher(), known_style_type()}]
```

# `get_style_type`

```elixir
@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:

1. looked-up from a list of "standard" styles, or
2. guessed from a list of default supported custom formats, or
3. guessed from a list of user-provided supported custom formats.

If no type could be guessed, returns `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
