XLSXComposer.Sheet (xlsx_composer v0.1.0)

View Source

Elixir.XLSXComposer.Sheet corresponds to Elixls's Sheet and translates into that if you want to do additional stuff or if you have to work around limitations of this library.

Summary

Types

excel_cell_by_row_idx()

@type excel_cell_by_row_idx() :: %{
  required(integer()) => [XLSXComposer.CellDef.excel_cells()]
}

t()

@type t() :: %XLSXComposer.Sheet{
  excel_cells: XLSXComposer.CellDef.excel_cells(),
  max_row_idx: integer(),
  name: String.t()
}

Functions

build(args)

@spec build(map()) :: {:ok, t()} | {:error, term()}

excel_rows_max_column(grouped_excel_cell_by_row_idx)

@spec excel_rows_max_column(excel_cell_by_row_idx()) :: %{
  required(integer()) => integer()
}

generate_empty_row(max_column)

@spec generate_empty_row(non_neg_integer()) :: [nil]

group_excel_cell_by_row_idx(excel_cells)

@spec group_excel_cell_by_row_idx(XLSXComposer.CellDef.excel_cells()) ::
  excel_cell_by_row_idx()

to_elixlsx_rows(sheet)

@spec to_elixlsx_rows(t()) :: []

to_elixlsx_sheet(sheet)

validate(sheet)

@spec validate(t()) :: {:ok, t()} | {:error, term()}