ExVEx.Style.Builder (ExVEx v0.2.0)

Copy Markdown View Source

Translates the keyword-style options accepted by ExVEx.put_style/4 into updated %Font{}, %Fill{}, %Border{}, %Alignment{} records, merging with the cell's existing style.

Supported options:

Font: :bold, :italic, :strike, :underline, :font_size, :font_name, :color (ARGB "FFRRGGBB" or "RRGGBB" auto-prefixed, or {:theme, n}, {:indexed, n}, or :auto).

Fill: :background ("RRGGBB" shorthand → solid pattern, or :none), :fill_pattern + :fill_fg + :fill_bg for full control.

Border: :border (applies to all sides: atom like :thin or keyword [top: :thin, bottom: :medium]), :border_color.

Alignment: :align (:left:center:right:fill
:justify:general), :valign (:top:center:bottom

:justify), :wrap_text, :indent, :text_rotation.

Number format: :number_format ("yyyy-mm-dd", "#,##0.00", "0%", etc.).

Summary

Types

opts()

@type opts() :: keyword()

Functions

apply_to_alignment(existing, opts)

@spec apply_to_alignment(ExVEx.OOXML.Styles.AlignmentRecord.t() | nil, opts()) ::
  ExVEx.OOXML.Styles.AlignmentRecord.t() | nil

apply_to_border(border, opts)

@spec apply_to_border(ExVEx.Style.Border.t(), opts()) :: ExVEx.Style.Border.t()

apply_to_fill(fill, opts)

@spec apply_to_fill(ExVEx.Style.Fill.t(), opts()) :: ExVEx.Style.Fill.t()

apply_to_font(font, opts)

@spec apply_to_font(ExVEx.Style.Font.t(), opts()) :: ExVEx.Style.Font.t()