Skip to content

Novis\Spreadsheet\Sheet

One sheet of a Workbook. Add its rows in order with addRow or addRows, and a row cannot be changed after that. The other methods add merged cells, links, notes, tables and more. They can use any row you already added.

Returned by

You get a Novis\Spreadsheet\Sheet from these methods:

Members

16 members.

MemberSignature
constructorconstructor(uint $index, Writer $writer, callable(uint, array<mixed>, RowOptions): void $add, callable(uint, ?uint, bool): void $ready, callable(bytes): void $send, callable(uint, string): uint $position, callable(uint, uint): string $columnRange): void
addRowaddRow(array<mixed> $row, RowOptions $options = null): Sheet
addRowsaddRows(array<array<mixed>>|Iterable<array<mixed>>|Iterator<array<mixed>> $rows): Sheet
cellcell(string $key, int $row): string
columncolumn(string $key): string
mergeCellsmergeCells(string $range): Sheet
addLinkaddLink(string $cell, string $target, ?{ text?: string, tooltip?: string } $options = null): Sheet
addNoteaddNote(string $cell, string $text, ?{ author?: string } $options = null): Sheet
addValidationaddValidation(string $range, Validation $rule): Sheet
addOutlineGroupaddOutlineGroup(string $rows, ?{ collapsed?: bool } $options = null): Sheet
addTableaddTable(string $range, TableOptions $options = null): Sheet
addConditionalFormataddConditionalFormat(string $range, Conditional $rule): Sheet
addImageaddImage(string $cell, bytes $data, ?{ width?: float, height?: float, offsetX?: float, offsetY?: float } $options = null): Sheet
addChartaddChart(string $cell, Chart $chart, ?{ width?: float, height?: float } $options = null): Sheet
setPrintOptionssetPrintOptions(PrintOptions $options): Sheet
protectprotect(?{ password?: string, allow?: array<string> } $options = null): Sheet

Types

RowOptions

type RowOptions = ?{    height?: float,    hidden?: bool,    level?: uint,    style?: Style,};

Bounds

type Bounds = { min?: int | float | string, max?: int | float | string };

Validation

type Validation = {    list?: array<string>,    whole?: Bounds,    decimal?: Bounds,    date?: Bounds,    length?: Bounds,    formula?: string,    input?: string,    inputTitle?: string,    error?: string,    errorTitle?: string,    allowEmpty?: bool,};

TableOptions

type TableOptions = ?{    name?: string,    style?: string,    banded?: bool,    filter?: bool,    totals?: array<string | Formula>,};

Conditional

type Conditional = {    kind: string,    operator?: string,    values?: array<string>,    colors?: array<string>,    icons?: string,    rank?: uint,    percent?: bool,    style?: Style,};

PrintOptions

type PrintOptions = {    orientation?: string,    fitToPage?: { width?: uint, height?: uint },    margins?: { top: float, right: float, bottom: float, left: float },    header?: string,    footer?: string,    repeatRows?: string,    area?: string,};