View Source Exceed (Exceed v0.7.0)
Exceed is a high-level stream-oriented library for generating Excel files, useful when generating spreadsheets from data sets that exceed available memory (or the memory that one wishes to devote to generating Excel files).
Examples
iex> rows = Stream.repeatedly(fn -> [:rand.uniform(), :rand.uniform()] end)
iex> stream = Exceed.Workbook.new("creator name")
...> |> Exceed.Workbook.add_worksheet(
...> Exceed.Worksheet.new("Sheet", ["header a", "header b"], Enum.take(rows, 10)))
...> |> Exceed.stream!()
...>
iex> zip = stream |> Enum.to_list() |> IO.iodata_to_binary()
iex> {:ok, package} = XlsxReader.open(zip, [source: :binary])
iex> XlsxReader.sheet_names(package)
["Sheet"]
Summary
Functions
Convert an Exceed.Workbook
to a stream. See Exceed.Workbook.new/1
,
Exceed.Worksheet.new/4
, and Exceed.Workbook.add_worksheet/2
.
Functions
@spec stream!( Exceed.Workbook.t(), keyword() ) :: Enum.t()
Convert an Exceed.Workbook
to a stream. See Exceed.Workbook.new/1
,
Exceed.Worksheet.new/4
, and Exceed.Workbook.add_worksheet/2
.
The only option at the moment is buffer
which can be set to true
(the default)
or to false
(which may be more performant in some situations).