[]
Ƭ GetFileFunctionType: (filePath
: string
) => File
| Blob
▸ (filePath
): File
| Blob
description
获取文件流
属性名 | 类型 | 说明 |
---|---|---|
filePath |
string |
文件路径 |
File
| Blob
Ƭ GetPartialValuesErrorCallbackType: (errorMsg
: string
) => void
▸ (errorMsg
): void
description
获取值时错误回调
属性名 | 类型 | 说明 |
---|---|---|
errorMsg |
string |
错误信息 |
void
Ƭ GetPartialValuesSuccessCallbackType: (externalValues
: ExternalPartialValues
) => void
▸ (externalValues
): void
description
获取值时成功回调
属性名 | 类型 | 说明 |
---|---|---|
externalValues |
ExternalPartialValues |
外部值列表 |
void
▸ getPartialValues(refList
, getFile
, getPartialValuesSuccessCallback
, getPartialValuesErrorCallback
): void
直接从文件中获取特定引用路径列表的值
static
代码示例
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);
});
属性名 | 类型 | 说明 |
---|---|---|
refList |
IExternalReference [] |
外部引用的数组 |
getFile |
GetFileFunctionType |
根据指定的文件路径返回文件或 Blob 的函数 |
getPartialValuesSuccessCallback |
GetPartialValuesSuccessCallbackType |
在成功获取部分值时调用的回调函数 |
getPartialValuesErrorCallback |
GetPartialValuesErrorCallbackType |
在获取部分值失败时调用的错误回调函数 |
void
▸ registerMaxDigitWidth(fontFamily
, fontSize
, maxDigitWidth
): void
将未知的最大数字宽度信息注册到 IO
属性名 | 类型 | 说明 |
---|---|---|
fontFamily |
string |
默认样式字体的字体系列 |
fontSize |
number |
默认样式字体的字号(以点为单位) |
maxDigitWidth |
number |
默认样式字体的最大数字宽度 |
void