Elixlsx.Compiler.NumFmtDB (elixlsx v0.6.0) View Source

Link to this section Summary

Functions

Returns a list of tuples {id, NumFmt.t} for all custom (id >= 164) NumFmts.

Register an ID for a built-in NumFmt object.

Link to this section Types

Specs

t() :: %Elixlsx.Compiler.NumFmtDB{
  nextid: non_neg_integer(),
  numfmts: %{required(Elixlsx.Style.NumFmt.t()) => pos_integer()}
}

Link to this section Functions

Link to this function

custom_numfmt_id_tuples(db)

View Source

Specs

custom_numfmt_id_tuples(t()) :: [{non_neg_integer(), Elixlsx.Style.NumFmt.t()}]

Returns a list of tuples {id, NumFmt.t} for all custom (id >= 164) NumFmts.

Specs

id_sorted_numfmts(t()) :: [Elixlsx.Style.NumFmt.t()]
Link to this function

register_builtin(db, value, id)

View Source

Register an ID for a built-in NumFmt object.

Built-in refers to the 164 objects (ids 0-163) that are defined or reserved in the XLSX standard. A NumFmt object mimicking the behaviour of such a built-in style can be associated with the built-in id using this function, which should save a couple of bytes in the resulting XLSX file.

Link to this function

register_numfmt(db, value)

View Source