[]
        
(Showing Draft Content)

Excel.IO-1

Class: IO

Excel.IO

Table of contents

Constructors

Methods

Constructors

constructor

new IO()

Represents an excel import and export class.

Methods

open

open(file, successCallBack, errorCallBack?, options?): void

Imports an excel file.

Parameters

Name Type Description
file Blob The excel file.
successCallBack Function Call this function after successfully loading the file. function (json) .
errorCallBack? Function Call this function if an error occurs. The exception parameter object structure { errorCode: GC.Spread.Excel.IO.ErrorCode, errorMessage: string}.
options? any -

Returns

void


registerMaxDigitWidth

registerMaxDigitWidth(fontFamily, fontSize, maxDigitWidth): void

Register a unknown max digit width info to ExcelIO.

Parameters

Name Type Description
fontFamily string The font family of default style's font.
fontSize number The font size of default style's font(in point).
maxDigitWidth number The max digit width of default style's font.

Returns

void


save

save(json, successCallBack, errorCallBack?, options?): void

Creates and saves an excel file with the SpreadJS json.

Parameters

Name Type Description
json string | object The spread sheets json object, or string.
successCallBack Function Call this function after successfully exporting the file. function (blob) .
errorCallBack? Function -
options? any -

Returns

void