Interface ISheetModelOptions

Optional values passed to a sheet

interface ISheetModelOptions {
    getName?: ((model) => string);
    isDate1904System?: boolean;
    maxColumns?: number;
    maxRows?: number;
    onBeforeDelete?: ((model) => void);
    sharedResources?: ISharedResourceCollection;
    sheetStyle?: ISheetStyle;
    transactionStore?: TransactionStore;
    uid?: string;
}

Hierarchy (view full)

Properties

getName?: ((model) => string)

Callback to provide a sheet with a logical name. This is used when a sheet name property is invoked.

Type declaration

    • (model): string
    • Parameters

      Returns string

Remarks

Sheets don't have a name by default but as a convenience we allow for the name to be called on a sheet

isDate1904System?: boolean

Determine if dates should be 1904 instead of 1900 based

Default Value

false
maxColumns?: number

Set the maxRow size

Default Value

16384
maxRows?: number

Set the maxRow size

Default Value

1048576
onBeforeDelete?: ((model) => void)

Callback for delete before the sheet is deleted. If this throws an error then the delete will be aborted.

Type declaration

sharedResources?: ISharedResourceCollection

collection of shared resources. If not provided then workbook will create it's own.

sheetStyle?: ISheetStyle

collection of shared styles. If not provided then workbook will create it's own.

transactionStore?: TransactionStore

The store for all state changes. This is provided to enable versioning, undo/redo, distributed editing, etc.

Default Value

internal
uid?: string

A unique identifier used for identifying this sheet during operations (i.e. copy/paste). This must be unique for all in-memory instances of a sheet.

Note - it is not saved as part of the persisted model

See

SheetJSON.

Param: uid

unique identifier for in memory operations. If not provided a default one will be used.