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

Functions

Adds an Exceed.Worksheet to the workbook.

Initialize a new workbook with a creator name.

Types

t()

@type t() :: %Exceed.Workbook{creator: String.t(), worksheets: [Exceed.Worksheet.t()]}

Functions

add_worksheet(wb, ws)

@spec add_worksheet(t(), Exceed.Worksheet.t()) :: t()

Adds an Exceed.Worksheet to the workbook.

new(creator)

@spec new(String.t()) :: t()

Initialize a new workbook with a creator name.