跳到主要内容

填充 ExcelMake

填充 Excel 是一个 PDF4me 模块 Make 填满 Excel 包含带有实时功能的智能标记占位符的工作簿 JSON 它能自动处理数据,逐行展开数组,并在一次操作中重新计算公式。可用于生成已填写的发票模板、动态报表或数据驱动型报表。 Excel 任何输出 JSON 在您的场景中,无需手动输入数据即可获得数据源。

本模块的功能

PDF4me Excel填充 接受一个 Excel 带有智能标记占位符的模板 JSON 数据有效载荷,并返回一个完全填充的数据。 Excel 在您的工作簿中 Make 场景。数组在 JSON 自动扩展到行,公式插入后会自动重新计算,并且可以通过索引定位特定工作表。最终生成可直接分发的文件。 Excel 报告完全根据您的场景数据生成,无需手动输入。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

验证您的身份 API 要求

每一个 PDF4me 模块 Make 需要有效 联系创建或选择一个可以容纳您的 PDF4me API 关键在于该场景能够进行身份验证 Excel 安全地提出人口请求。

您不容错过的重要事实

智能标记名称必须匹配 JSON 确切的按键
您的字段名称 JSON 有效载荷必须与智能标记占位符匹配 Excel 模板完全正确,包括大小写。标记 &=Items.ItemName 需要一个 JSON 名为 项目 包含具有以下特征的对象 物品名称 属性。如果匹配失败,输出中的占位符将不会被替换。运行场景前务必验证键名。
数组会自动逐行向下扩展。
JSON 绑定到智能标记的值是一个数组,该模块会在每个标记单元格下方插入一行,每个元素对应一行,并将现有行向下移动。无需预先根据预期行数调整模板大小。这使得填充模块适用于发票、订单列表以及任何数据行数在运行时变化的报表。
设置严格 JSON 数值公式的字符串为“否”
严格 JSON 字符串设置为“是”(默认值),数值用引号括起来。 JSON 例如 55 以文本形式插入 Excel如果下游的 SUM 或其他公式需要将它们视为数字,请设置 Strict。 JSON 字符串到否,因此该模块会将带引号的数字字符串强制转换为数字。 Excel 人口之前的细胞值。
使用 PDF4me Excel 填充模块,显示“连接”字段,“文件”设置为“Dropbox - 下载文件”,以及包含“Items”数组的 JSON 数据文本区域,该数组包含“ItemName”、“Qty”和“UnitPrice”字段。

地图 联系, 放 文件Dropbox 或者地图,并传递一个 JSON 有效负载的键与智能标记字段名称匹配 Excel 模板。

参数

必需的: 连接、文件(源)和 JSON 必须提供数据。所有其他字段均为可选。有关智能标记语法参考,请参阅[此处应插入参考文献]。 Aspose Cells WorkbookDesigner 文档有关文化代码,请参阅 Microsoft BCP 47 文化名称参考

范围必需的它的作用例子
ConnectionRequiredPDF4me Excel API connection. Click Add and paste your API key if connecting for the first time.My PDF4me Excel connection
FileRequiredFile source mode. Map supplies the Excel template binary from a prior module output. Dropbox - Download a File pulls directly from Dropbox, reducing the number of modules needed.Map
File NameOptionalExcel template filename including extension (.xlsx). Map from the prior module file name output or enter a static value. Used to identify the template and name the output file.invoice-template.xlsx
DocumentRequiredBinary content of the Excel template workbook. Map from a Google Drive download, SharePoint file, email attachment, or HTTP response. Must be the raw file buffer.1. Data
JSON DataRequiredJSON string whose keys match the Smart Marker placeholders in the Excel template. Arrays expand row by row. Scalar values fill single cells. Pass as a mapped string from a prior module or a static JSON literal.{"Items":[{"ItemName":"A123","Qty":"55","UnitPrice":"3.05"}]}
Strict JSON StringsNoYes (default): inserts quoted string values as text in Excel. No: coerces quoted numeric strings to numeric cell values so formulas can operate on them. Empty behaves like Yes.Yes
Culture & Language SettingsNoBCP 47 locale code controlling date and number formatting in the output. Defaults to en-US (MM/DD/YYYY, period decimal). Change to match your data source locale: de-DE, fr-FR, and so on.en-US
Calculate FormulasNoYes (default): recalculates all workbook formulas after JSON data is inserted. No: skips recalculation. Enable when the template contains SUM, VLOOKUP, or other formulas that depend on the populated values.Yes
Worksheet IndexesNoComma-separated 1-based indexes of worksheets to populate. Enter 1 for the first sheet only, 1,3 for first and third. Leave empty to populate all worksheets in the workbook.1
Quote Prefix To StyleNoYes: converts Excel quote-prefix formatting to visible cell style. No: removes it. Empty (default): preserves existing quote-prefix behavior without conversion. Use Empty unless your template specifically requires style conversion.Empty
使用 PDF4me 将 Excel 填充到高级设置中,显示“严格 JSON 字符串”为“是”,“区域和语言设置”为“en-US”,“计算公式”为“是”,“工作表索引”为 1,以及“引用前缀样式为空”。

可选设置: 严格的 JSON 字符串文化与语言环境计算公式工作表索引, 和 引用前缀到样式。 放 计算公式:是 因此,工作簿公式会反映已填充的数据。

输出

场地类型它包含什么
documentBase64 StringThe fully populated Excel workbook encoded as Base64. Decode it with a Make Tools module, then pass the binary to a Google Drive upload, email attachment, Dropbox create-file, or HTTP POST to distribute the report.
FileNameStringOutput filename for the populated workbook, derived from the input template name. Use this as the target filename when saving to cloud storage to preserve the original naming convention.
SuccessBooleanTrue if the template was populated without errors. Add a Make filter on this field before routing the output to avoid processing incomplete results from failed runs.

快速试用(3分钟内即可完成)

以上截图对应的是两个可直接运行的组合。下载每对文件,并将 XLSX 文件映射到相应位置。 文档 (或使用) Dropbox 文件模式),粘贴 JSON 进入 JSON 数据并运行一次该场景。

组合A:简单项目(与参数截图相符)

用途 模板.xlsx工作表索引 = 2 (Sheet2 包含参数屏幕截图中使用的简单项目标记)。与配套的平面项目配对。 JSON

组合 B:包含丰富发票 Excel 桌子

使用发票单 模板.xlsx 嵌套 &=RootData.Items.* 标记物,结构化参考公式 简易发票 表格,小计+税+总计计算。

组合 C:多页工作簿

这是一个三页模板,每页展示不同的数据源。文件中的表格顺序是: 物品、员工、产品

如何填充一个 Excel 模板 Make

  1. 打开你的 Excel 使用模板并将智能标记占位符放置在应该显示数据的单元格中: &=ObjectName.FieldName 对于标量值和 &=ArrayName.FieldName 对于逐行扩展的数组。
  2. 添加 PDF4me Excel 致你 Make 场景并选择 Excel - 填充
  3. 选择或创建 联系 你的 PDF4me API 钥匙。
  4. 文件地图 并连接 文件名文档 一个 Google DriveSharePoint, 或者 Dropbox 下载模块。或者将文件设置为 Dropbox 下载文件 直接拉取模板。
  5. 地图 JSON 数据 来自先前的模块,该模块生成 JSON 字符串,或粘贴静态字符串 JSON 务必确保每个键都与模板中相应的智能标记字段名称匹配。
  6. 计算公式是的 如果模板包含依赖于已填充值的公式,请输入 工作表索引 仅针对特定工作表,或留空以全部显示。
  7. 点击 节省 然后运行。解码 文档 输出并将其路由到云存储上传、电子邮件或其他方式。 API 根据需要。

何时应该使用 Populate ExcelMake

在 Make 中何时应该使用 Populate Excel?Common Make automation patterns using the Populate Excel module.
根据订单数据自动生成发票
  1. webhook 会接收包含客户详细信息和订单明细的新订单有效负载。 JSON 大批。
  2. 该场景会从某个来源下载一个品牌发票模板。 Google Drive
  3. 填充 Excel 地图顺序 JSON 在模板中使用智能标记,每行项目展开一行,并重新计算总计公式。
  4. 填写完毕的发票将通过电子邮件发送给客户,并上传到客户文件夹中。 SharePoint
从数据库中填写每周KPI报告 API
  1. 每周一次的定时触发器会触发并调用 REST API 获取最新的KPI指标 JSON
  2. 该场景会从中提取KPI报告模板。 Dropbox 使用内置的 Dropbox 文件模式。
  3. 填充 Excel 将指标值插入模板单元格并重新计算趋势公式。
  4. 完成的报告会发布到 Slack 频道,并保存到按日期命名的存档文件夹中。 Google Drive
每个客户填充 Excel 摘要 CRM 出口
  1. A CRM 当交易被标记为已完成/已赢单时,webhook 会触发,提供客户和交易数据。 JSON
  2. 该场景会从某个来源下载交易概要模板。 SharePoint 仅针对工作表索引 1。
  3. 填充 Excel 将客户名称、交易金额和产品线项目填写到模板中。
  4. 已填写的摘要将上传到客户文件夹,并在项目管理工具中为客户团队创建一个任务。

常见问题解答

How do I auto populate an Excel template with data in Make?+
Use the PDF4me Excel - Populate module. Create an Excel template with Smart Marker placeholders such as &=Items.ItemName, then pass a matching JSON string in the JSON Data field. The module replaces every placeholder with the corresponding value from the JSON, expands arrays into rows, and returns the filled workbook ready for distribution.
What are Smart Markers and how do I write them in Excel?+
Smart Markers are placeholder strings placed in Excel cells that the Populate module replaces with live JSON data at run time. Write them as &=ObjectName.FieldName for scalar values or &=ArrayName.FieldName for arrays. For example, placing &=Items.ItemName in a cell tells the module to insert the ItemName property from each element of the Items JSON array, one per row.
What does Calculate Formulas do and when should I enable it?+
Calculate Formulas: Yes (the default) triggers a full workbook formula recalculation after the JSON data is inserted. Enable it whenever the template contains SUM, VLOOKUP, IF, or other formulas that reference the populated cells, so the formula results reflect the new data. Set it to No only if formula recalculation is unnecessary or handled downstream.
How do I populate only specific worksheets and not the whole workbook?+
Enter the 1-based worksheet indexes as a comma-separated list in the Worksheet Indexes field: for example 1 for the first sheet only, or 1,3 for the first and third. Leave the field empty to populate all worksheets. This is useful when the template contains data sheets with Smart Markers alongside static reference or chart sheets you do not want the module to modify.
What is the difference between Strict JSON Strings Yes and No?+
With Strict JSON Strings set to Yes (the default), string values in the JSON such as '55' are inserted into Excel cells as text. With No, quoted numeric strings are coerced to numeric Excel values. Choose No when downstream formulas such as SUM need to treat those values as numbers rather than text strings.
What does Quote Prefix To Style do?+
Quote Prefix To Style controls whether Excel quote-prefix cell formatting (a hidden attribute that forces text interpretation of cell content) is converted to a visible cell style in the output workbook. Leave it at Empty (the default) for standard behavior. Set Yes only if your template uses quote-prefix styling and you need that to appear as a visible format in the populated output.

相关模块

获取帮助