Skip to main content

Salesforce LWC

销售队伍 是一套基于云的客户关系管理 (CRM) 软件系统。"闪电网络组件" (LWC) 是一个强大的 JavaScript 扩展平台,可用于 Salesforce 应用 [^1]。

¥Salesforce is a suite of cloud-based software systems for Customer Relationship Management (CRM). "Lightning Web Components" (LWC) is a robust JavaScript extension platform available to Salesforce apps[^1].

SheetJS 是一个用于从电子表格读取和写入数据的 JavaScript 库。

¥SheetJS is a JavaScript library for reading and writing data from spreadsheets.

该演示探讨了 Salesforce 中的 LWC 脚本功能。我们将探索如何在 Lightning Web 组件中安装 SheetJS 脚本并构建用于将列表导出到 XLSX 工作簿的示例应用。

¥This demo explores the LWC scripting features in Salesforce. We'll explore how to install SheetJS scripts in Lightning Web Components and build a sample app for exporting lists to XLSX workbooks.

Salesforce 可能会以向后不兼容的方式更改平台,因此演示可能需要一些调整。应查阅官方文档。

¥Salesforce may change the platform in backwards-incompatible ways, so the demo may require some adjustments. The official documentation should be consulted.

测试部署

该演示于 2024 年 5 月 5 日使用 Lightning API 版本 59.0 进行了最后一次测试。

¥This demo was last tested on 2024 May 05 using Lightning API version 59.0.

遥测

Salesforce 开发者工具嵌入了遥测技术。可以通过将环境变量 SF_DISABLE_TELEMETRY 设置为 true 或运行以下命令来禁用它

¥The Salesforce developer tools embed telemetry. It can be disabled by setting the environment variable SF_DISABLE_TELEMETRY to true or by running

npx @salesforce/cli config set disable-telemetry=true --global

集成详情

¥Integration Details

Lightning Web 组件可以加载存储在静态资源中的脚本。

¥Lightning Web Components can load scripts stored in static resources.

安装

¥Installation

SheetJS 独立脚本 可以作为静态资源下载和添加。

¥The SheetJS Standalone scripts can be downloaded and added as a static resource.

由于 Salesforce 名称限制,该脚本必须重命名为 sheetjs.js

¥Due to Salesforce name restrictions, the script must be renamed to sheetjs.js.

加载 SheetJS

¥Loading SheetJS

假设脚本重命名为 sheetjs.js,则资源名称将为 sheetjsasync 函数可以使用 loadScript 来获取和加载库。该脚本将定义变量 XLSX[^2]

¥Assuming the script was renamed to sheetjs.js, the name of the resource will be sheetjs. async functions can use loadScript to fetch and load the library. The script will define the variable XLSX[^2]

建议在回调中加载库。例如,以下 @api 方法加载库并将示例数据导出到电子表格文件:

¥It is recommended to load the library in a callback. For example, the following @api method loads the library and exports sample data to a spreadsheet file:

import { LightningElement, api } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import sheetjs from '@salesforce/resourceUrl/sheetjs';

export default class SheetComponent extends LightningElement {
@api async download() {
await loadScript(this, sheetjs); // load the library
// At this point, the library is accessible with the `XLSX` variable

// Create worksheet
var ws = XLSX.utils.aoa_to_sheet([
[ "S", "h", "e", "e", "t", "J"," S" ],
[ 5 , 4 , 3 , 3 , 7 , 9 , 5 ]
]);

// Create workbook and add worksheet
var wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "Data");

// Export Data
XLSX.writeFile(wb, "SheetForceExport.xlsx");
}
}

从 SF 列表导出数据

¥Exporting Data from SF List

使用 LWC Wire Service,组件在单独的事件中接收数据。[^3] 事件处理程序通常将更新的数据存储在组件状态中,确保在请求电子表格导出时数据可用。

¥Using the LWC Wire Service, components receive data in separate events.[^3] Event handlers typically store the updated data in component state, ensuring the data is available when a spreadsheet export is requested.

获取账户数据

¥Getting Account Data

该演示使用已弃用的 getListUi 函数 [^4] 来提取账户数据。getListUi 需要 LWC 对象的名称(objectApiName 属性)和 LWC 列表视图的名称(listViewApiName 属性)

¥This demo uses the deprecated getListUi function[^4] to pull account data. getListUi requires the name of the LWC object (objectApiName property) and name of the LWC list view (listViewApiName property)

以下代码片段从 "所有账户" 列表视图接收数据:

¥The following snippet receives data from the "All Accounts" list view:

import { LightningElement, wire } from 'lwc';
import { getListUi } from 'lightning/uiListApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';

// ...

export default class SheetComponent extends LightningElement {
@wire(getListUi, {
objectApiName: ACCOUNT_OBJECT.objectApiName,
listViewApiName: 'AllAccounts'
}) listInfo({ error, data }) {

// LIST DATA AVAILABLE HERE

};
// ...
}

数组的数组

¥Array of Arrays

SheetJS 最可靠地转换 "数组的数组",这是一个直接映射到各个单元格地址的嵌套数组。例如:

¥SheetJS most reliably translates "arrays of arrays", a nested array which directly maps to individual cell addresses. For example:

var data = [
["Name", "Phone"], // row 1
["Foo Bar", "(555) 555-5555"], // row 2
["Baz Qux", "(555) 555-5556"] // row 3
];

API 通常返回嵌套对象,因此必须构造数组。

¥The APIs typically return nested objects, so the array must be constructed.

Salesforce Representation (click to show)

The data parameter in the callback has a deep structure. Typically one would set a property in the component and display data in a template:

  // ...
// declare records variable in the component
records;
@wire(getListUi, {
objectApiName: ACCOUNT_OBJECT.objectApiName,
listViewApiName: 'AllAccounts'
}) listInfo({ error, data }) {
if (data) {
// data.records.records is the array of interest
this.records = data.records.records;
this.error = undefined;
}
}
// ...

The template itself would iterate across the records:

<template>
<template if:true={records}>
<table>
<tr><th>Name</th><th>Phone</th></tr>
<template for:each={records} for:item="record">
<tr key={record.fields.Id.value}>
<td>{record.fields.Name.value}</td>
<td>{record.fields.Phone.value}</td>
</tr>
</template>
</table>
</template>
</template>

可以通过跨记录映射来构造合适的 SheetJS 数组:

¥A suitable SheetJS array of arrays can be constructed by mapping across records:

      var headers = [ "Name", "Phone" ];
var aoa = [headers].concat(data.records.records.map(record => [
record.fields.Name.value, // Name field
record.fields.Phone.value, // Phone field
]));

状态

¥State

此数据可在有线服务回调中使用,但通常在单独的 API 事件中导出数据。该流程通过状态变量进行处理:

¥This data is available in a wire service callback, but it is common to export the data in a separate API event. This flow is handled with a state variable:

export default class SheetComponent extends LightningElement {
aoa; // will hold data for export
@wire(getListUi, {
objectApiName: ACCOUNT_OBJECT.objectApiName,
listViewApiName: 'AllAccounts'
}) listInfo({ error, data }) {
if (data) {
var headers = [ "Name", "Phone" ];
// create AOA
var _aoa = [headers].concat(data.records.records.map(record => [
record.fields.Name.value, // Name field
record.fields.Phone.value, // Phone field
]));

// assign to state
this.aoa = _aoa;
} else if (error) console.log(error);
};
}

导出数据

¥Exporting Data

这可以很容易地通过回调函数导出到电子表格中。从数组的数组开始,SheetJS aoa_to_sheet 方法 [^5] 生成一个 SheetJS 工作表对象 [^6]。使用 book_new[^8] 创建工作簿对象 [^7],并使用 book_append_sheet[^9] 添加工作表。最后,SheetJS writeFile 方法创建一个 XLSX 文件并启动下载 [^10]。

¥This is readily exported to a spreadsheet in a callback function. Starting from the array of arrays, the SheetJS aoa_to_sheet method[^5] generates a SheetJS sheet object[^6]. A workbook object[^7] is created with book_new[^8] and the sheet is added with book_append_sheet[^9]. Finally, the SheetJS writeFile method creates a XLSX file and initiates a download[^10].

  @api async download() {
await loadScript(this, sheetjs); // load the library
// get data from state
var _aoa = this.aoa;

// create workbook
var wb = XLSX.utils.book_new();
var ws = XLSX.utils.aoa_to_sheet(_aoa);
XLSX.utils.book_append_sheet(wb, ws, "Data");

// export
XLSX.writeFile(wb, "SheetForceExport.xlsx");
};

完整示例

¥Complete Example

该演示是在 "开发者版" 账户上构建的。在撰写本文时,可以免费创建账户。

¥This demo was built on a "Developer Edition" account. At the time of writing, an account can be created for free.

  1. 创建 "开发者版" 账户。记下唯一的用户名

    ¥Create a "Developer Edition" account. Take note of the unique Username

配置工具

¥Configure Tools

  1. 安装 NodeJS 长期支持

    ¥Install NodeJS LTS.

  2. 禁用遥测:

    ¥Disable telemetry:

npx @salesforce/cli config set disable-telemetry=true --global
  1. 通过检查版本信息确认 CLI 工具是否正常工作:

    ¥Confirm the CLI tool works by checking version information:

npx @salesforce/cli --version

上次测试演示时,命令打印

¥When the demo was last tested, the command printed

@salesforce/cli/2.39.6 darwin-x64 node-v22.0.0
  1. 从 CLI 工具登录到组织:

    ¥Log into the org from the CLI tool:

npx @salesforce/cli org login web

这将打开一个网络浏览器。登录并授权该应用。

¥This will open a web browser. Sign in and authorize the application.

创建项目

¥Create Project

  1. 使用 project generate 命令创建 "SheetForce" 示例项目:

    ¥Create the "SheetForce" sample project with the project generate command:

npx @salesforce/cli project generate -n SheetForce

进入项目目录:

¥Enter the project directory:

cd SheetForce
  1. 使用 lightning generate component 命令创建 LWC 组件:

    ¥Create a LWC component with the lightning generate component command:

npx @salesforce/cli lightning generate component --type lwc -n sheetComponent -d force-app/main/default/lwc
  1. force-app\main\default\lwc\sheetComponent\sheetComponent.html 替换为以下模板代码:

    ¥Replace force-app\main\default\lwc\sheetComponent\sheetComponent.html with the following template code:

force-app\main\default\lwc\sheetComponent\sheetComponent.html (add highlighted lines)
<template>
<b>SheetForce demo</b>
</template>
  1. force-app\main\default\lwc\sheetComponent\sheetComponent.js-meta.xml 替换为以下 XML:

    ¥Replace force-app\main\default\lwc\sheetComponent\sheetComponent.js-meta.xml with the following XML:

force-app\main\default\lwc\sheetComponent\sheetComponent.js-meta.xml (replace highlighted lines)
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<masterLabel>SheetForce</masterLabel>
<description>SheetJS Demo</description>
<targets>
<target>lightning__AppPage</target>
</targets>
</LightningComponentBundle>

部署示例项目

¥Deploy Sample Project

  1. 从 CLI 部署项目。你将需要 Salesforce 唯一的用户名。例如,如果用户名为 SF@USER.NAME,则命令为:

    ¥Deploy the project from the CLI. You will need the Salesforce unique Username. For example, if the Username was SF@USER.NAME, the command is:

npx @salesforce/cli project deploy start -d force-app -o SF@USER.NAME
  1. 找到新组件:

    ¥Find the new component:

要在 "闪电体验" 视图中查找新组件:

¥To find the new component in "Lightning Experience" view:

A) 在 Salesforce 站点中,单击页面右上角的齿轮图标,然后选择 "设置"(当前应用的设置)。

¥A) In the Salesforce site, click on the gear icon in the top-right corner of the page and select "Setup" (Setup for current app).

B) 在左侧边栏搜索框中输入 "自定义代码"。展开 "自定义代码",展开 "闪电组件",然后单击 "闪电组件"。

¥B) Type "Custom Code" in the left sidebar search box. Expand "Custom Code", expand "Lightning Components" and click "Lightning Components".

对于某些安全设置,Salesforce 将显示错误:

¥With certain security settings, Salesforce will show an error:

我们无法显示此页面,因为你的浏览器阻止跨域 Cookie,但你可以在 Salesforce Classic 中查看此页面。

¥We can't display this page because your browser blocks cross-domain cookies, but you can view this page in Salesforce Classic.

单击链接可在 Salesforce Classic 中打开页面。

¥Click the link to open the page in Salesforce Classic.

Salesforce Classic 中的页面将如下图所示:

¥The page in Salesforce Classic will look like the screenshot below:

Custom Component

初始化应用页面

¥Initialize App Page

创建应用页面

¥Create App Page

  1. 在 "闪电应用生成器" 中创建 "应用页面":

    ¥Create an "App Page" in the "Lightning App Builder":

A) 在 Salesforce 站点中,单击页面右上角的齿轮图标,然后选择 "设置"(当前应用的设置)。

¥A) In the Salesforce site, click on the gear icon in the top-right corner of the page and select "Setup" (Setup for current app).

B) 在左侧边栏搜索框中输入 "应用构建"。展开 "用户界面" 并单击 "闪电应用生成器"。

¥B) Type "App Build" in the left sidebar search box. Expand "User Interface" and click "Lightning App Builder".

对于某些安全设置,Salesforce 将显示错误:

¥With certain security settings, Salesforce will show an error:

我们无法显示此页面,因为你的浏览器阻止跨域 Cookie,但你可以在 Salesforce Classic 中查看此页面。

¥We can't display this page because your browser blocks cross-domain cookies, but you can view this page in Salesforce Classic.

单击链接可在 Salesforce Classic 中打开页面。

¥Click the link to open the page in Salesforce Classic.

C) 单击 "新的" 按钮。

¥C) Click the "New" button.

应用向导

¥App Wizard

D) 在左侧列表中选择 "应用页面",然后单击 "下一个"

¥D) Select "App Page" in the left list and click "Next"

E) 在标签文本框中输入 "SheetJS 演示",然后单击 "下一个"

¥E) Type "SheetJS Demo" in the Label textbox and click "Next"

F) 在左侧列表中选择 "一区",然后单击 "完毕"

¥F) Select "One Region" in the left list and click "Done"

应用生成器

¥App Builder

  1. 将 "SheetForce" 组件添加到应用页面。

    ¥Add the "SheetForce" component to the App Page.

在左侧 "成分" 侧边栏中的 "风俗" 部分下,应该有一个 "SheetForce" 条目。

¥In the left "Components" sidebar, under the "Custom" section, there should be a "SheetForce" entry.

单击 "SheetForce" 并将其拖动到应用构建器主视图中的 "在此处添加组件" 框架中,以将其添加到页面。

¥Click and drag "SheetForce" into the "Add Component(s) Here" frame in the app builder main view to add it to the page.

单击 "保存"。

¥Click "Save".

  1. 激活页面。

    ¥Activate the page.

当显示 "页面已保存" 模态时,单击 "启用"。

¥When the "Page Saved" modal is displayed, click "Activate".

应设置以下选项:

¥The following options should be set:

  • 单击 "图标" 旁边的 "改变...",然后选择一个令人难忘的图标

    ¥Click "Change..." next to "Icon" and pick a memorable icon

  • 在 "闪电体验" 下单击 "LightningBolt",然后单击 "将页面添加到应用"

    ¥Under "Lightning Experience" click "LightningBolt" then "Add page to app"

单击 "保存" 激活该页面。

¥Click "Save" to activate the page.

  1. 打开演示页面。

    ¥Open the demo page.

单击页面左上角的向左箭头返回“设置”。

¥Click the left arrow in the top-left corner of the page to return to Setup.

如果顶部有 "切换到闪电体验",请单击该链接。

¥If there is a "Switch to Lightning Experience" at the top, click the link.

单击应用启动器 (᎒᎒᎒) 并搜索 "SheetJS"。在 "项目" 下,将列出新的 "SheetJS 演示",单击 "SheetJS 演示"。

¥Click the App Launcher (᎒᎒᎒) and search for "SheetJS". Under "Items", the new "SheetJS Demo" will be listed, Click "SheetJS Demo".

应用将显示组件模板中的 "SheetForce 演示" 文本:

¥The app will display the "SheetForce demo" text from the component template:

Demo

添加 SheetJS

¥Add SheetJS

  1. Download https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js

不要 "复制和粘贴"!应明确下载该文件。复制和粘贴会损坏源代码,并且组件会以微妙的方式失败。

¥DO NOT "COPY AND PASTE"! The file should be explicitly downloaded. Copying and pasting corrupts the source code and the component will fail in subtle ways.

最简单的方法是右键单击链接并选择 "保存链接为..."

¥The easiest approach is to right-click the link and select "Save Link As..."

可以在 PowerShell 或 bash 中运行以下命令:

¥The following command can be run in PowerShell or bash:

curl -o xlsx.full.min.js https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js
  1. 将文件移至 force-app/main/default/staticresources/ 文件夹并将文件重命名为 sheetjs.js

    ¥Move the file to the force-app/main/default/staticresources/ folder and rename the file to sheetjs.js.

如果文件是从上一个命令下载的,mv 可以移动并重命名:

¥If the file was downloaded from the previous command, mv can move and rename:

mv xlsx.full.min.js force-app/main/default/staticresources/sheetjs.js
  1. 使用以下 XML 创建 force-app/main/default/staticresources/sheetjs.resource-meta.xml(在步骤 2 的文件夹中的 sheetjs.resource-meta.xml):

    ¥Create force-app/main/default/staticresources/sheetjs.resource-meta.xml (sheetjs.resource-meta.xml in the folder from step 2) with the following XML:

force-app/main/default/staticresources/sheetjs.resource-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
<cacheControl>Private</cacheControl>
<contentType>application/javascript</contentType>
</StaticResource>
  1. 再次部署项目。将 SF@USER.NAME 替换为唯一的用户名:

    ¥Deploy the project again. Replace SF@USER.NAME with the unique Username:

npx @salesforce/cli project deploy start -d force-app -o SF@USER.NAME
  1. 寻找静态资源:

    ¥Look for the static resource:

A) 在 Salesforce 站点中,单击页面右上角的齿轮图标,然后选择 "设置"(当前应用的设置)。

¥A) In the Salesforce site, click on the gear icon in the top-right corner of the page and select "Setup" (Setup for current app).

B) 在左侧边栏搜索框中输入 "静止的"。点击 "静态资源"

¥B) Type "Static" in the left sidebar search box. Click "Static Resources"

对于某些安全设置,Salesforce 将显示错误:

¥With certain security settings, Salesforce will show an error:

我们无法显示此页面,因为你的浏览器阻止跨域 Cookie,但你可以在 Salesforce Classic 中查看此页面。

¥We can't display this page because your browser blocks cross-domain cookies, but you can view this page in Salesforce Classic.

单击链接可在 Salesforce Classic 中打开页面。

¥Click the link to open the page in Salesforce Classic.

Salesforce Classic 中的页面将如下图所示:

¥The page in Salesforce Classic will look like the screenshot below:

Static Resources

测试静态资源

¥Test the Static Resource

  1. force-app/main/default/lwc/sheetComponent/sheetComponent.js 替换为以下脚本:

    ¥Replace force-app/main/default/lwc/sheetComponent/sheetComponent.js with the following script:

force-app/main/default/lwc/sheetComponent/sheetComponent.js (replace script)
import { LightningElement } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import sheetjs from '@salesforce/resourceUrl/sheetjs';

export default class SheetComponent extends LightningElement {
version = "???"; // start with ???
async connectedCallback() {
await loadScript(this, sheetjs); // load the library
// At this point, the library is accessible with the `XLSX` variable
this.version = XLSX.version;
}
}

该组件公开基于 SheetJS 版本的 version 属性。

¥This component exposes a version property based on the SheetJS version.

  1. force-app/main/default/lwc/sheetComponent/sheetComponent.html 替换为以下模板:

    ¥Replace force-app/main/default/lwc/sheetComponent/sheetComponent.html with the following template:

force-app/main/default/lwc/sheetComponent/sheetComponent.html
<template>
<b>SheetForce {version}</b>
</template>

该模板引用 version 属性。

¥This template references the version property.

  1. 再次部署项目。将 SF@USER.NAME 替换为唯一的用户名:

    ¥Deploy the project again. Replace SF@USER.NAME with the unique Username:

npx @salesforce/cli project deploy start -d force-app -o SF@USER.NAME
  1. 重新加载 "SheetJS 演示" 页面。该页面应显示 SheetJS 版本:

    ¥Reload the "SheetJS Demo" page. The page should display the SheetJS version:

Version number

Salesforce 可能需要几分钟时间刷新。如果刷新后演示仍然显示原始 "SheetForce 演示" 文本,请关闭并重新打开演示应用。

¥It may take a few minutes for Salesforce to refresh. If the demo still shows the original "SheetForce demo" text after refreshing, close and reopen the demo app.

从 SF 列表导出数据

¥Export Data from SF Lists

  1. sheetComponent.html 添加一个按钮,该按钮将调用 download 回调:

    ¥Add a button to sheetComponent.html that will call a download callback:

force-app/main/default/lwc/sheetComponent/sheetComponent.html
<template>
<!-- if the `aoa` property is set, show a button -->
<template if:true={aoa}>
<button onclick={download}><b>Click to Export!</b></button>
</template>
<!-- if the `aoa` property is not set, show a message -->
<template if:false={aoa}><b>Please wait for data to load ...</b></template>
</template>
  1. sheetComponent.js 替换为以下内容:

    ¥Replace sheetComponent.js with the following:

force-app/main/default/lwc/sheetComponent/sheetComponent.js
import { LightningElement, wire, api } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import { getListUi } from 'lightning/uiListApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';

import sheetjs from '@salesforce/resourceUrl/sheetjs';

export default class SheetComponent extends LightningElement {
aoa; // will hold data for export
@wire(getListUi, {
objectApiName: ACCOUNT_OBJECT.objectApiName,
listViewApiName: 'AllAccounts'
}) listInfo({ error, data }) {
if (data) {
var headers = [ "Name", "Phone" ];
// create AOA and assign to `aoa` property
this.aoa = [headers].concat(data.records.records.map(record => [
record.fields.Name.value, // Name field
record.fields.Phone.value, // Phone field
]));
} else if (error) console.log(error);
};
@api async download() {
await loadScript(this, sheetjs); // load the library
// create workbook
var wb = XLSX.utils.book_new();
var ws = XLSX.utils.aoa_to_sheet(this.aoa);
XLSX.utils.book_append_sheet(wb, ws, "Data");
// export
XLSX.writeFile(wb, "SheetForceExport.xlsx");
};
}
  1. 再次部署项目。将 SF@USER.NAME 替换为唯一的用户名:

    ¥Deploy the project again. Replace SF@USER.NAME with the unique Username:

npx @salesforce/cli project deploy start -d force-app -o SF@USER.NAME
  1. 重新加载 "SheetJS 演示" 页面。该页面应包含一个导出按钮:

    ¥Reload the "SheetJS Demo" page. The page should include a button for export:

SF Export Button

  1. 单击 "点击导出!" 按钮。该应用将尝试下载文件。

    ¥Click the "Click to Export!" button. The app will attempt to download a file.

简单的导出包括所有数据:

¥The simple export includes all of the data:

Excel Export

SheetJS 专业版 提供了额外的样式选项,例如单元格样式、自动列宽计算和冻结行。

¥SheetJS Pro offers additional styling options like cell styling, automatic column width calculations, and frozen rows.

[^1]: 强烈建议查看 Salesforce 文档中有详细介绍

¥It is strongly recommended to review the detailed introduction in the Salesforce documentation

[^2]: XLSX 变量是 SheetJS 库的主要全局变量。它公开了 "API 参考" 中描述的方法

¥The XLSX variable is the main global for the SheetJS library. It exposes methods as described in "API Reference"

[^3]: 请参阅 Salesforce LWC 文档中的 "了解有线服务"

¥See "Understand the Wire Service" in the Salesforce LWC documentation.

[^4]: 请参阅 Salesforce LWC 文档中的 getListUI

¥See getListUI in the Salesforce LWC documentation.

[^5]: 见 aoa_to_sheet 于 "实用工具"

¥See aoa_to_sheet in "Utilities"

[^6]: 见 "Sheet 对象"

¥See "Sheet Objects"

[^7]: 见 "工作簿对象"

¥See "Workbook Object"

[^8]: 见 book_new 于 "实用工具"

¥See book_new in "Utilities"

[^9]: 见 book_append_sheet 于 "实用工具"

¥See book_append_sheet in "Utilities"

[^10]: 见 writeFile 于 "写入文件"

¥See writeFile in "Writing Files"