跳到主要内容

合并 Excel 文件 Make

合并 Excel 文件 是一项结合多种技术的自动化操作 Excel 将多个工作簿合并成一个单一的合并文件,方法是将工作表按受控顺序连接起来,同时保留所有源文件中的公式、格式和数据。 PDF4me 自动处理重复工作表名称解析,并支持 XLSX、XLS、 PDF, 和 CSV 以单个输出形式 Make 模块调用。详情请参见 Excel Microsoft Learn 支持的文件格式 以及 Open XML SDK 文档

本模块的功能

PDF4me Excel合并文件 自动合并多个 Excel 将多个工作簿合并到一个单独的文件中 Make 无需 Power Query、VBA 或手动复制粘贴,即可完成合并工作簿。只需将每个源文件添加到“文件”数组,指定排序位置以控制输出工作簿中的制表符顺序,选择要从每个文件中包含的工作表,然后选择输出格式。重复的工作表名称将自动解决。合并后的工作簿即可上传、通过电子邮件发送或传递给任何下游模块。

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

验证您的身份 API 要求

每一个 PDF4me 模块 Make 需要有效 联系创建或选择一个可以容纳您的 PDF4me API 关键在于确保该方案能够安全地验证工作簿合并请求。

您不容错过的重要事实

排序位置控制输出中的制表符顺序
文件按升序排列,编号最小的文件优先合并。您可以将 1 分配给一月,2 分配给二月,3 分配给三月,或者将 1 分配给北,2 分配给南,这样每次运行该方案时,输出工作簿中的工作表顺序都会保持一致且可预测。
要合并的工作表限制了要包含的工作表标签。
对于数组中的每个文件,您可以列出要导入的特定工作表名称。如果将此字段留空,则包含该文件中的所有工作表。仅选择所需的选项卡(例如“摘要”和“数据”),可以显著减小源工作簿中包含原始数据或中间计算表时的输出文件大小。
重复的工作表名称会自动解决。
当两个源工作簿都包含名为“Summary”的工作表时,该模块会将第二个工作表重命名为“Summary_1”,第三个重命名为“Summary_2”,依此类推。您无需在运行合并操作之前预先重命名源文件中的工作表。
PDF4me Excel合并文件模块显示输出文件名,输出格式设置为XLSX,以及一个文件数组项,其中包含文件名、文件内容、排序位置和要合并的工作表字段。

输出文件名和输出格式在顶部设置。文件数组中的每个项提供一个源工作簿,并指定其排序位置和可选的工作表筛选器。

参数

必需的: 要运行该模块,必须提供连接、输出文件名、输出格式,以及文件数组中至少包含一个文件名和文件内容的项。

范围必需的它的作用例子
ConnectionYesPDF4me API connection. Click Add and paste your API key if connecting for the first time.Your PDF4me connection
Output File NameYesName for the merged output file without any extension. The correct extension is added automatically based on the OutputFormat you select.Q1_Consolidated
OutputFormatYesFormat for the merged output. XLSX works with all modern Excel versions. XLS supports legacy systems. PDF creates a read-only archive. CSV exports the first worksheet only as plain comma-separated text.XLSX
Files: File NameYesOriginal filename including extension for each source workbook item in the Files array.january_sales.xlsx
Files: FileYesBase64-encoded content of the source Excel file. Map from a Google Drive, Dropbox, or SharePoint download module, or from an HTTP request that returns the file.Base64-encoded file content
Files: Sort PositionNoMerge order for this file: lower numbers are placed first in the output. Assign 1 to January, 2 to February, and so on.1
Files: Worksheets To MergeNoList of specific worksheet names to include from this file. Leave empty to include all sheets. Naming specific tabs reduces output file size.Summary, Data

输出

场地类型它包含什么
documentString (Base64)The merged workbook encoded in Base64. Decode and pipe into a Google Drive upload, SharePoint save, email attachment, or any downstream module that accepts a file buffer.

如何合并 Excel 文件 Make

  1. 添加 PDF4me Excel合并文件 致你 Make 设想。
  2. 选择 联系 (或点击) 添加 用你的 API 钥匙)。
  3. 进入 输出文件名 (不带扩展名)并选择 输出格式
  4. 点击 添加项目 在下面 文件对于每个源工作簿,映射 文件名文件 来自先前下载模块的内容,设置 排序位置,并可选择性地列出 待合并的工作表
  5. 点击 节省 然后跑。 文档 输出包含合并后的工作簿 Base64将其通过管道传递给上传模块以保存到 Google DriveDropbox, 或者 SharePoint

何时应该使用合并 Excel 文件?

何时应该使用合并Excel文件功能?Common Make scenario patterns using Merge Excel Files.
部门月度报告汇总
  1. 每月1日上午8点会触发一个预定事件。
  2. Google Drive 下载各部门的月度报告 Excel 报告。每个文件都映射为 Files 数组中的一个元素,排序位置为 1-10,以确保部门顺序一致。
  3. 合并文件功能会将所有报告合并到一个统一的工作簿中,工作表标签以部门名称为单位。
  4. 合并后的 XLSX 文件已上传至执行中心。 Google Drive 文件夹已保存并通过电子邮件发送给领导层。
季度存档(只读) PDF
  1. 预定触发器会在季度结束后的第一天触发。
  2. SharePoint 一月、二月和三月的下载量 Excel 文件。排序位置 1、2 和 3 强制执行时间制表符顺序。
  3. 合并文件时,输出格式设置为 PDF合并后的工作簿将作为不可编辑的季度快照存档。
  4. PDF 已保存到合规性存储中,并在合规性索引表中记录一条条目。
区域销售汇总(含部分报表)
  1. 每周触发一次,从以下位置检索区域销售报告: Dropbox五个文件,对应五个地区。
  2. 每个文件项将要合并的工作表设置为仅“汇总”和“数据”,排除原始计算工作表,从而保持输出紧凑。
  3. 排序位置分配一致的区域顺序(北=1,南=2,东=3,西=4,中部=5)。
  4. 每周一早上,汇总后的 XLSX 文件都会通过电子邮件发送给销售副总裁。

常见问题解答

How many Excel files can I merge in a single module call?+
There is no enforced limit on the number of items in the Files array. Add one item per source workbook and assign each a Sort Position. The module processes all of them in a single API call, making it practical for consolidating 10, 20, or more monthly or regional reports in one scenario run.
What happens when two source workbooks have a worksheet with the same name?+
Duplicate worksheet names are resolved automatically. The module appends a numeric suffix to later occurrences: so if two workbooks both have a "Summary" tab, the second becomes "Summary_1", the third "Summary_2", and so on. You never need to pre-rename tabs in your source files.
Can I include only specific worksheets from each file?+
Yes. In each Files array item, list the exact worksheet names you want in the Worksheets To Merge field. Leave the field empty to include every sheet from that file. Selecting only the sheets you need: for example "Summary" and "Data" : significantly reduces the output file size when source workbooks contain raw or intermediate calculation tabs.
When should I choose PDF or CSV output instead of XLSX?+
Choose PDF when the merged workbook is for distribution or compliance archiving: it preserves the visual layout and cannot be accidentally edited. Choose CSV when the consolidated data needs to go directly into a database or another system that reads plain text. Note that CSV output contains only the first worksheet of the merged result.
Does the merged output preserve formulas and formatting from the source files?+
Yes. Worksheet content and cell formatting from each source file are preserved in the output. Formulas are included as-is when outputting to XLSX or XLS. If you need the merged file to contain only static values for a clean data handoff, consider passing the output through a subsequent Excel processing module before distribution.

相关模块

获取帮助