XLSXComposer.CellDef (xlsx_composer v0.3.0)
View SourceElixir.XLSXComposer.CellDef showcases all supported options as a struct that is later folded into representation required by Elixlsx.
:configuration
is a map of settings you might want to use to tag elements and later on, globally collect and apply an additional style if required.
Summary
Types
@type border_style() :: list()
@type content() :: any()
@type elixlsx_definition() :: [content() | {style_option(), any()}]
@type excel_cells() :: %{required(XLSXComposer.ExcelCoords.t()) => t()}
@type new_attrs() :: %{ optional(:content) => content(), optional(:wrap_text) => boolean(), optional(:font) => String.t(), optional(:align_vertical) => boolean(), optional(:align_horizontal) => boolean(), optional(:bold) => boolean(), optional(:italic) => boolean(), optional(:underline) => boolean(), optional(:strike) => boolean(), optional(:size) => pos_integer(), optional(:color) => String.t(), optional(:bg_color) => String.t(), optional(:num_format) => String.t(), optional(:datetime) => boolean(), optional(:yyyymmdd) => String.t(), optional(:border) => Keyword.t(), optional(:configuration) => %{required(String.t()) => any()} }
@type section_cells() :: %{required(XLSXComposer.SectionCoords.t()) => t()}
@type style_option() :: {:wrap_text, boolean()} | {:font, String.t()} | {:align_vertical, boolean()} | {:align_horizontal, boolean()} | {:bold, boolean()} | {:italic, boolean()} | {:underline, boolean()} | {:strike, boolean()} | {:size, pos_integer()} | {:color, String.t()} | {:bg_color, String.t()} | {:num_format, String.t()} | {:datetime, boolean()} | {:yyyymmdd, boolean()}
@type t() :: %XLSXComposer.CellDef{ align_horizontal: boolean() | nil, align_vertical: boolean() | nil, bg_color: String.t() | nil, bold: boolean() | nil, border: Keyword.t() | nil, color: String.t() | nil, configuration: %{required(String.t()) => any()}, content: content(), datetime: boolean() | nil, font: String | nil, italic: boolean() | nil, num_format: String.t() | nil, size: pos_integer() | nil, strike: boolean() | nil, underline: boolean() | nil, wrap_text: boolean() | nil, yyyymmdd: String.t() | nil }
Functions
@spec displace(XLSXComposer.ExcelCoords.t(), XLSXComposer.SectionCoords.t()) :: XLSXComposer.ExcelCoords.t()
@spec set_style_option(t(), style_option()) :: t()
@spec to_elixlsx_cell_def(t() | nil) :: elixlsx_definition() | nil