Novis\Spreadsheet\Workbook
An Excel file (xlsx), an OpenDocument file (ods) or a CSV file that your program writes row by row. A name that ends in .ods or .csv, or format: 'ods' or format: 'csv', sets the format. Each create method sets where the file goes. Add a sheet with addSheet, add its rows, and call finish at the end.
Members
8 members.
| Member | Signature |
|---|---|
createForDownload | createForDownload(string $name, Options $options = null): Workbook |
createForFile | createForFile(string $path, Options $options = null): Workbook |
createForStream | createForStream(Core\IO\File $file, Options $options = null): Workbook |
createInMemory | createInMemory(Options $options = null): Workbook |
fromRows | fromRows(array<array<mixed>>|Iterable<array<mixed>>|Iterator<array<mixed>> $rows, ExportOptions $options = null): Export |
addSheet | addSheet(string $name, SheetOptions $options = null): Sheet |
defineName | defineName(string $name, string $reference): Workbook |
finish | finish(): Written |
Types
Options
Column
SheetOptions
ExportOptions
type ExportOptions = ?{ sheet?: string, zone?: string, format?: string, properties?: { title?: string, subject?: string, author?: string, company?: string, keywords?: string, created?: Core\Time\Instant, }, csv?: { separator?: string, quote?: string, charset?: Core\Charset }, columns?: array<Column>, header?: bool, freeze?: bool, autofilter?: bool, headerStyle?: Style | bool, overflow?: string, position?: uint, hidden?: bool | string, tabColor?: string, zoom?: uint, gridlines?: bool, rightToLeft?: bool,};RowOptions
Value
type Value = { text: string }| { number: float }| { integer: int }| { decimal: string }| { boolean: bool }| { date: Core\Time\Date }| { time: Core\Time\TimeOfDay }| { duration: Core\Time\Duration }| { day: Core\Time\Date, clock: Core\Time\TimeOfDay }| { formula: string, cachedText: ?string, cachedNumber: ?float }| { runs: array<{ text: string, style: ?uint }> };