excelizer v0.1.7 Excelizer.Style.Alignment

module to manage a struct about alignment

Link to this section Summary

Types

type for horizontal setting

t()

struct for Excelizer.Image module

type for vertical setting

Functions

convert Alignment struct to json

Link to this section Types

Specs

horizonal() ::
  :left
  | :center
  | :right
  | :fill
  | :justify
  | :center_continuous
  | :distributed

type for horizontal setting

  • left: indented left
  • center: centering
  • right: indented right
  • fill: filling
  • justify: justified
  • center_continuous: cross-column centered
  • distributed: intended decentralized alignment

Specs

t() :: %Excelizer.Style.Alignment{
  horizonal: horizonal(),
  indent: nil | integer(),
  justify_last_line: boolean(),
  reading_order: nil | integer(),
  relative_indent: nil | integer(),
  shrink_to_fit: boolean(),
  text_rotation: nil | integer(),
  vertical: vertical(),
  wrap_text: boolean()
}

struct for Excelizer.Image module

Specs

vertical() :: :top | :center | :justify | :distributed

type for vertical setting

  • left: indented left
  • center: centering
  • justify: justified
  • distributed: intended decentralized alignment

Link to this section Functions

Link to this function

convert_to_map(data)

Specs

convert_to_map(t()) :: map()

convert Alignment struct to json

Example

iex> convert_to_map(%Excelizer.Style.Alignment{horizonal: :center_continuous})
%{horizonal: "centerContinuous", indent: nil, justify_last_line: false, reading_order: nil, relative_indent: nil, shrink_to_fit: nil, text_rotation: nil, vertical: :top, wrap_text: false}

iex> convert_to_map(%Excelizer.Style.Alignment{horizonal: :top})
%{horizonal: "top", indent: nil, justify_last_line: false, reading_order: nil, relative_indent: nil, shrink_to_fit: nil, text_rotation: nil, vertical: :top, wrap_text: false}