[]
        
(Showing Draft Content)

GC.Spread.Sheets.IO

Namespace: IO

Spread.Sheets.IO

Table of contents

Enumerations

Type aliases

Functions

Type aliases

GetFileFunctionType

Ƭ GetFileFunctionType: (filePath: string) => File | Blob

Type declaration

▸ (filePath): File | Blob

description get file by file path.

Parameters
Name Type Description
filePath string the file path.
Returns

File | Blob

  • Returns the file or file blob.

GetPartialValuesErrorCallbackType

Ƭ GetPartialValuesErrorCallbackType: (errorMsg: string) => void

Type declaration

▸ (errorMsg): void

description the error callback of get partial values.

Parameters
Name Type Description
errorMsg string the error message.
Returns

void


GetPartialValuesSuccessCallbackType

Ƭ GetPartialValuesSuccessCallbackType: (externalValues: ExternalPartialValues) => void

Type declaration

▸ (externalValues): void

description the success callback of get partial values.

Parameters
Name Type Description
externalValues ExternalPartialValues the external value list.
Returns

void

Functions

getPartialValues

getPartialValues(refList, getFile, getPartialValuesSuccessCallback, getPartialValuesErrorCallback): void

Gets the the values of specific reference path list from file directly.

static

example

function getFile (path) {
  // return file by path
}
let refList = spread.getExternalReferences(true);
GC.Spread.Sheets.IO.getPartialValues(refList, getFile, (externalValues) => {
  // successCallback
  spread.updateExternalReference(externalValues);
}, (errorMsg) => {
  // errorCallback
  console.log(errorMsg);
});

Parameters

Name Type Description
refList IExternalReference[] The array of external reference.
getFile GetFileFunctionType The function which return file or blob by the specified file path.
getPartialValuesSuccessCallback GetPartialValuesSuccessCallbackType The success callback function which called when get values successfully.
getPartialValuesErrorCallback GetPartialValuesErrorCallbackType The error callback function which called when get values failed.

Returns

void


registerMaxDigitWidth

registerMaxDigitWidth(fontFamily, fontSize, maxDigitWidth): void

Register a unknown max digit width info to IO.

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