[]
Ƭ GetFileFunctionType: (filePath: string) => File | Blob
▸ (filePath): File | Blob
description 通过文件路径获取文件。
| Name | Type | Description |
|---|---|---|
filePath |
string |
文件路径。 |
File | Blob
Ƭ GetPartialValuesErrorCallbackType: (errorMsg: string) => void
▸ (errorMsg): void
description 获取部分值的错误回调。
| Name | Type | Description |
|---|---|---|
errorMsg |
string |
错误消息。 |
void
Ƭ GetPartialValuesSuccessCallbackType: (externalValues: ExternalPartialValues) => void
▸ (externalValues): void
description 获取部分值的成功回调。
| Name | Type | Description |
|---|---|---|
externalValues |
ExternalPartialValues |
外部值列表。 |
void
▸ 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);
});
| Name | Type | Description |
|---|---|---|
refList |
IExternalReference[] |
外部引用的数组。 |
getFile |
GetFileFunctionType |
返回指定文件路径的文件或blob的函数。 |
getPartialValuesSuccessCallback |
GetPartialValuesSuccessCallbackType |
成功回调函数,当获取值成功时调用。 |
getPartialValuesErrorCallback |
GetPartialValuesErrorCallbackType |
错误回调函数,当获取值失败时调用。 |
void
▸ registerMaxDigitWidth(fontFamily, fontSize, maxDigitWidth): void
注册一个未知最大数字宽度信息到IO。
| Name | Type | Description |
|---|---|---|
fontFamily |
string |
默认样式的字体家族。 |
fontSize |
number |
默认样式的字体大小(以点为单位)。 |
maxDigitWidth |
number |
默认样式的字体最大数字宽度。 |
void