Skip to content

Novis\Spreadsheet\Reader

A spreadsheet file that your program reads row by row, such as an upload. It can be xlsx, xlsm, xlsb, xls, ods or CSV. Open one with Reader::open. Every string and bytes value it returns is tainted, because it comes from the file.

Members

12 members.

MemberSignature
openopen(Core\Bytes::Source $source, OpenOptions $options = null): Reader
sheetssheets(): array<SheetInfo>
macrosmacros(): array<tainted string>
mergedmerged(tainted string|int $sheet): array<tainted string>
linkslinks(tainted string|int $sheet): array<Link>
notesnotes(tainted string|int $sheet): array<Note>
namesnames(): array<Name>
tablestables(tainted string|int $sheet): array<Table>
evaluateevaluate(): array<Missed>
imagesimages(tainted string|int $sheet): array<Image>
propertiesproperties(): Properties
rowsrows(tainted string|int $sheet, RowOptions $options = null): Iterator<Row>

Enums

Types

RowOptions

type RowOptions = ?{    header?: bool | int,    from?: uint,    limit?: uint,    columns?: array<string>,    zone?: string,    text?: bool | array<string>,    formulas?: bool,    emptyRows?: string,    merged?: string,    hidden?: string,    locale?: string,};

SheetInfo

type SheetInfo = {    name: tainted string,    position: uint,    visibility: Visibility,    rows: ?uint,    columns: ?uint,    kind: SheetKind,};
type Link = {    anchor: tainted string,    target: tainted string,    text: ?tainted string,    tooltip: ?tainted string,    external: bool,};

Note

type Note = {    noted: tainted string,    note: tainted string,    author: ?tainted string,};

Name

type Name = {    name: tainted string,    reference: tainted string,    sheet: ?tainted string,};

Table

type Table = {    table: tainted string,    name: tainted string,    sheet: tainted string,};

Missed

type Missed = {    cell: tainted string,    kind: string,    text: tainted string,};

Image

type Image = {    at: tainted string,    image: tainted bytes,    format: tainted string,    link: ?tainted string,};

Properties

type Properties = {    title: ?tainted string,    subject: ?tainted string,    author: ?tainted string,    company: ?tainted string,    keywords: ?tainted string,    created: ?Core\Time\Instant,};

OpenOptions

type OpenOptions = ?{    csv?: {        separator?: string,        quote?: string,        escape?: string,        charset?: Core\Charset,    },};