[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(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 通过文件路径获取文件。

Parameters
Name Type Description
filePath string 文件路径。
Returns

File | Blob

  • 返回文件或文件blob。

GetPartialValuesErrorCallbackType

Ƭ GetPartialValuesErrorCallbackType: (errorMsg: string) => void

Type declaration

▸ (errorMsg): void

description 获取部分值的错误回调。

Parameters
Name Type Description
errorMsg string 错误消息。
Returns

void


GetPartialValuesSuccessCallbackType

Ƭ GetPartialValuesSuccessCallbackType: (externalValues: ExternalPartialValues) => void

Type declaration

▸ (externalValues): void

description 获取部分值的成功回调。

Parameters
Name Type Description
externalValues ExternalPartialValues 外部值列表。
Returns

void

Functions

getPartialValues

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

直接从文件中获取特定引用路径列表的值。

static

example

function getFile (path) {
  // 返回指定文件路径的文件或blob
}
let refList = spread.getExternalReferences(true);
GC.Spread.Sheets.IO.getPartialValues(refList, getFile, (externalValues) => {
  // 成功回调函数
  spread.updateExternalReference(externalValues);
}, (errorMsg) => {
  // 错误回调函数
  console.log(errorMsg);
});

Parameters

Name Type Description
refList IExternalReference[] 外部引用的数组。
getFile GetFileFunctionType 返回指定文件路径的文件或blob的函数。
getPartialValuesSuccessCallback GetPartialValuesSuccessCallbackType 成功回调函数,当获取值成功时调用。
getPartialValuesErrorCallback GetPartialValuesErrorCallbackType 错误回调函数,当获取值失败时调用。

Returns

void


registerMaxDigitWidth

registerMaxDigitWidth(fontFamily, fontSize, maxDigitWidth): void

注册一个未知最大数字宽度信息到IO。

Parameters

Name Type Description
fontFamily string 默认样式的字体家族。
fontSize number 默认样式的字体大小(以点为单位)。
maxDigitWidth number 默认样式的字体最大数字宽度。

Returns

void