[]
        
(Showing Draft Content)

GC.Spread.Sheets

Namespace: Sheets

GC.Spread.Sheets

Table of contents

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

CellValue

Ƭ CellValue: Object

property col - A key-value collection, which key is a col number, and value is cell value with any type.

Index signature

▪ [col: number]: any


CustomDocumentPropertyValueType

Ƭ CustomDocumentPropertyValueType: string | number | boolean | Date

description Custom Document property type.


ExportCsvOptions

Ƭ ExportCsvOptions: Object

property fileType - The file type.

property [encoding] - Deprecated: Currently only support to export in UTF-8 encoding, set the encoding attribute will take no effect.

property [rowDelimiter] - The row delimiter that is appended to the end of the row, the default row delimiter is '\r\n'.

property [columnDelimiter] - The column delimiter that is appended to the end of the column, the default column delimiter is ','.

property [range] - The range info.

param The sheet index, the default sheet index is current active sheet index.

param The start row, the default row index is 0.

param The start column, the default column index is 0.

param The row count, the default row count is current active sheet row count.

param The column count, the default column count is current active sheet column count.

Type declaration

Name Type
columnDelimiter? string
encoding? string
range? { column: number ; columnCount: number ; row: number ; rowCount: number ; sheetIndex: number }
range.column number
range.columnCount number
range.row number
range.rowCount number
range.sheetIndex number
rowDelimiter? string

ExportOptions

Ƭ ExportOptions: FileOptions & ExportCsvOptions | ExportSSJsonOptions | ExportXlsxOptions


ExportSSJsonOptions

Ƭ ExportSSJsonOptions: Object

property fileType - The file type.

property [includeBindingSource] - Whether to include the binding source when converting the workbook to json, default false.

property [includeStyles] - Whether to include the style when converting the workbook to json, default true.

property [includeFormulas] - Whether to include the formula when converting the workbook to json, default true.

property [saveAsView] - Whether to apply the format string to exporting value when converting the workbook to json, default false.

property [rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when converting the workbook to json, default false.

property [columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when converting the workbook to json, default false.

property [includeAutoMergedCells] - Whether to include the automatically merged cells when converting the workbook to json, default false.

Type declaration

Name Type
columnHeadersAsFrozenRows? boolean
includeAutoMergedCells? boolean
includeBindingSource? boolean
includeFormulas? boolean
includeStyles? boolean
rowHeadersAsFrozenColumns? boolean
saveAsView? boolean
saveR1C1Formula? boolean

ExportXlsxOptions

Ƭ ExportXlsxOptions: Object

property fileType - The file type.

property [includeBindingSource] - Whether to include the binding source when do save, default false.

property [includeStyles] - Whether to include the style when do save, default true.

property [includeFormulas] - Whether to include the formula when do save, default true.

property [saveAsView] - Whether to apply the format string to exporting value when do save, default false.

property [rowHeadersAsFrozenColumns] - Whether to treat the row headers as frozen columns when do save, default false.

property [columnHeadersAsFrozenRows] - Whether to treat the column headers as frozen rows when do save, default false.

property [includeAutoMergedCells] - Whether to include the automatically merged cells when do save, default false.

property [includeCalcModelCache] - [deprecated] Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.

property [includeUnusedNames] - Whether to include the unused custom name when do save, default true.

property [includeEmptyRegionCells] - Whether to include any empty cells(cells with no data or only style) outside the used data range, default true.

property [password] - Set the password to open the workbook.

Type declaration

Name Type
columnHeadersAsFrozenRows? boolean
includeAutoMergedCells? boolean
includeBindingSource? boolean
includeCalcModelCache? boolean
includeEmptyRegionCells? boolean
includeFormulas? boolean
includeStyles? boolean
includeUnusedNames? boolean
password? string
rowHeadersAsFrozenColumns? boolean
saveAsView? boolean

ExternalPartialValues

Ƭ ExternalPartialValues: Object

property filePath - A key-value collection, which key is a file path string, and value is type of GC.Spread.Sheets.PartialValues.

Index signature

▪ [filePath: string]: PartialValues


FileOptions

Ƭ FileOptions: Object

property fileType - The file type.

Type declaration

Name Type Description
fileType FileType The file type.

ImportCsvOptions

Ƭ ImportCsvOptions: Object

property fileType - The file type.

property [encoding] - The csv encoding type, the default encoding type is 'UTF-8'.

property [rowDelimiter] - The row delimiter that is appended to the end of the row, the default row delimiter is '\r\n'.

property [columnDelimiter] - The column delimiter that is appended to the end of the column, the default column delimiter is ','.

Type declaration

Name Type
columnDelimiter? string
encoding? string
rowDelimiter? string

ImportOptions

Ƭ ImportOptions: FileOptions & ImportCsvOptions | ImportSSJsonOptions | ImportXlsxOptions


ImportSSJsonOptions

Ƭ ImportSSJsonOptions: Object

property fileType - The file type.

property [includeStyles] - Whether to include the style when converting json to the workbook, default true.

property [includeFormulas] - Whether to include the formula when converting json to the workbook, default true.

property [frozenColumnsAsRowHeaders] - Whether to treat the frozen columns as row headers when converting json to the workbook, default false.

property [frozenRowsAsColumnHeaders] - Whether to treat the frozen rows as column headers when converting json to the workbook, default false.

property [fullRecalc] - Whether to do full recalculation after loading the json data, default true.

property {boolean | object} [incrementalLoad] - Whether to use the incremental loading or the callbacks of incremental loading when converting json to the workbook, default false.

param The callback when of the incremental loading progress.

param The callback when of the incremental loading finished.

Type declaration

Name Type
frozenColumnsAsRowHeaders? boolean
frozenRowsAsColumnHeaders? boolean
fullRecalc? boolean
includeFormulas? boolean
includeStyles? boolean
incrementalLoad? any

ImportXlsxOptions

Ƭ ImportXlsxOptions: Object

property fileType - The file type.

property [includeStyles] - Whether to include the style when loading, default true.

property [includeFormulas] - Whether to include the formula when loading, default true.

property [frozenColumnsAsRowHeaders] - Whether to treat the frozen columns as row headers when loading, default false.

property [frozenRowsAsColumnHeaders] - Whether to treat the frozen rows as column headers when loading, default false.

property [fullRecalc] - Whether to calculate after loading the json data, false by default.

property [dynamicReferences] - Whether to calculate functions with dynamic reference, default true.

property [calcOnDemand] - Whether to calculate formulas only when they are demanded, default false.

property [incrementalCalculation] - Whether to incremental calculate formulas without blocking UI, default false.

property [includeUnusedStyles] - Whether to include the unused name style when converting excel xml to the json, default true.

property [password] - The password to open the workbook.

property [openMode] - The open mode of normal, lazy and incremental. By default is normal.

property [progress] - The progress callback function for each open mode.

Type declaration

Name Type
calcOnDemand? boolean
dynamicReferences? boolean
frozenColumnsAsRowHeaders? boolean
frozenRowsAsColumnHeaders? boolean
fullRecalc? boolean
includeFormulas? boolean
includeStyles? boolean
includeUnusedStyles? boolean
incrementalCalculation? boolean
openMode? OpenMode
password? string
progress? ProgressFunctionType

OpenOptions

Ƭ OpenOptions: Object

property [includeStyles] - Whether to include the style when loading, default true.

property [includeFormulas] - Whether to include the formula when loading, default true.

property [fullRecalc] - Whether to calculate after loading the json data, false by default.

property [dynamicReferences] - Whether to calculate functions with dynamic reference, default true.

property [calcOnDemand] - Whether to calculate formulas only when they are demanded, default false.

property [incrementalCalculation] - Whether to incremental calculate formulas without blocking UI, default false.

property [includeUnusedStyles] - Whether to include the unused name style when converting excel xml to the json, default true.

property [openMode] - The open mode of normal, lazy and incremental. By default is normal.

property [progress] - The progress callback function for each open mode.

Type declaration

Name Type
calcOnDemand? boolean
dynamicReferences? boolean
fullRecalc? boolean
includeFormulas? boolean
includeStyles? boolean
includeUnusedStyles? boolean
incrementalCalculation? boolean
openMode? OpenMode
progress? ProgressFunctionType

PartialValues

Ƭ PartialValues: Object

property row - A key-value collection, which key is a row number, and value is type of GC.Spread.Sheets.CellValue.

Index signature

▪ [row: number]: CellValue


ProgressArgs

Ƭ ProgressArgs: Object

property sheetName - the current loading sheet's name.

property step - the current loading step.

property progress - the current loading progress, from 0 ~ 1.

Type declaration

Name Type Description
progress number the current loading progress, from 0 ~ 1.
sheetName? string the current loading sheet's name.
step string the current loading step.

ProgressFunctionType

Ƭ ProgressFunctionType: (progressArgs: ProgressArgs) => void

Type declaration

▸ (progressArgs): void

description The callback when of the incremental loading progress.

Parameters
Name Type Description
progressArgs ProgressArgs the progress arguments.
Returns

void


SaveOptions

Ƭ SaveOptions: Object

property [includeBindingSource] - Whether to include the binding source when do save, default false.

property [includeStyles] - Whether to include the style when do save, default true.

property [includeFormulas] - Whether to include the formula when do save, default true.

property [saveAsView] - Whether to apply the format string to exporting value when do save, default false.

property [includeAutoMergedCells] - Whether to include the automatically merged cells when do save, default false.

property [includeCalcModelCache] - Whether to include the extra data of calculation. Can be faster when open the file with those data, default false.

property [includeUnusedNames] - Whether to include the unused custom name when do save, default true.

property [includeEmptyRegionCells] - Whether to include any empty cells(cells with no data or only style) outside the used data range, default true.

property [saveR1C1Formula] - Whether to save the r1c1 formula in the file, only works in sjs file type, default false.

Type declaration

Name Type
includeAutoMergedCells? boolean
includeBindingSource? boolean
includeCalcModelCache? boolean
includeEmptyRegionCells? boolean
includeFormulas? boolean
includeStyles? boolean
includeUnusedNames? boolean
saveAsView? boolean
saveR1C1Formula? boolean

SheetTabStyles

Ƭ SheetTabStyles: { [sheetTabState in SheetTabState]?: ISheetTabStyle }

property sheetTabState

Variables

LicenseKey

LicenseKey: string

Represents the license key for evaluation version and production version.

Functions

findControl

findControl(host): Workbook

Gets the Workbook instance by the host element.

Parameters

Name Type Description
host string | HTMLElement The host element or the host element id.

Returns

Workbook

The Workbook instance.


getTypeFromString

getTypeFromString(typeString): any

Gets the type from the type string. This method is used for supporting the serialization of the custom object.

Parameters

Name Type Description
typeString string The type string.

Returns

any

The type.