View Source Exceed.Workbook (Exceed v0.6.2)
The top-level data structure that collects worksheets and metadata for generating an Excel file.
Examples
iex> Exceed.Workbook.new("creator name")
#Exceed.Workbook<sheets: []>
iex> headers = ["header 1"]
iex> rows = Stream.repeatedly(fn -> [:rand.uniform(), :rand.uniform()] end)
iex> ws = Exceed.Worksheet.new("Sheet Name", headers, rows)
...>
iex> Exceed.Workbook.new("creator name")
...> |> Exceed.Workbook.add_worksheet(ws)
#Exceed.Workbook<sheets: ["Sheet Name"]>
Summary
Types
@type t() :: %Exceed.Workbook{creator: String.t(), worksheets: [Exceed.Worksheet.t()]}
Functions
@spec add_worksheet(t(), Exceed.Worksheet.t()) :: t()
Adds an Exceed.Worksheet
to the workbook.
Initialize a new workbook with a creator name.