Skip to main content

ExtendScript

ExtendScript 是 Photoshop 和 InDesign 脚本中使用的 JavaScript 方言。

¥ExtendScript is a dialect of JavaScript used in Photoshop and InDesign scripts.

每个独立的发布脚本均可在 https://cdn.sheetjs.com/ 处获得。

¥Each standalone release script is available at https://cdn.sheetjs.com/.

xlsx.extendscript.js 是一个特殊的 ExtendScript 兼容版本。该脚本经过精心组装,可以解决 ExtendScript 的怪癖。由于各种 JavaScript 压缩器和工具中的错误,脚本无法被压缩或后处理。

¥xlsx.extendscript.js is a special ExtendScript-compatible build. The script is carefully assembled to work around ExtendScript quirks. Due to bugs in various JavaScript minifiers and tools, scripts cannot be compressed or post-processed.

https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.extendscript.js is the URL for 0.20.3

下载脚本后,可以直接用 #include 引用:

¥After downloading the script, it can be directly referenced with #include:

#include "xlsx.extendscript.js"

监视存储库 或订阅 RSS 订阅 以在新版本发布时收到通知!

¥Watch the repo or subscribe to the RSS feed to be notified when new versions are released!

对于本地部署,脚本可以放置在 Scripts 文件夹中。该路径是特定于应用的。

¥For local deployments, the scripts can be placed in the Scripts folder. The path is application-specific.

应用地点
Photoshop应用文件夹中的 \Presets\Scripts
设计Windows > 实用程序 > 脚本,单击 > "在资源管理器中显示"
CEP 和 UXP 使用

从主机上下文(在 jsx 脚本文件内)执行电子表格操作时,应使用 ExtendScript 构建。

¥The ExtendScript build should be used when performing spreadsheet operations from the host context (within a jsx script file).

CEP:独立脚本 应添加到 CEP 扩展 HTML 中。

¥CEP: The standalone scripts should be added to CEP extension HTML.

UXP:可以使用 require 函数直接在 UXP 脚本中加载 独立脚本

¥UXP: The standalone scripts can be loaded directly in UXP scripts using the require function.