跳到主要内容

Excel - JSON 出口 Zapier

PDF4me 提取行 是一个 Zapier 转换一系列操作 Excel 将行和列结构化 JSON设置工作表和行/列范围,或提取所有内容,并选择值是保留为原生类型还是导出为文本。返回一个可供使用的 RowData 数组。 APIs、数据库或下一个 Zap 步骤。

此操作的作用

从……读取工作表 Excel 在之前的 Zap 步骤中映射的文件,应用您设置的行/列范围和筛选选项,并将每一行作为结果返回。 JSON RowData 数组中的对象。使用“包含表头行”选项,可将每个对象的键命名为第一行的名称;使用“排除”选项,可跳过隐藏行或空行;还可以选择是否保留数字和日期的原始格式。 JSON 输入或导出为纯文本。

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

验证您的身份 API 要求

要访问 PDF4me 网站 API 通过 Zapier每个请求都必须包含正确的身份验证凭据。身份验证可确保通信安全,并验证您作为授权用户的身份,从而实现与您的系统之间的无缝集成。 Zapier 工作流程和 PDF4me强大的 Excel 数据提取服务。

您不容错过的重要事实

仅需提交文件。
文件名、工作表名称以及所有范围、筛选和格式设置字段都是可选的。 Zapier 配置。
行号和列号均从 1 开始,匹配 Excel
第一行第 1 行是 Excel 第 1 行,第一列是 A 列。使用 -1 表示最后一行或最后一列,以到达数据末尾。
将值导出为文本会更改类型,而不是值。
设置为 True 可输出全部字符串(便于格式验证),设置为 False 可保留数字、日期和布尔值作为原生类型。 JSON 类型。

:::提示:从之前的步骤中获取映射文件和文件名

使用 + 旁边的按钮 文件文件名 例如,从之前的 Zap 步骤进行映射, 完整文件名 来自前 PDF4me Excel 行动。 Excel 文件必须提供完整内容,不能仅提供“存在但未显示”的引用。

:::

:::警告 文件:(存在但未显示)

如果在“文件”字段中看到“文件:(存在但未显示)”并收到“文件为空”错误,请选择提供相应选项的选项。 完整文件内容 另见。 Zapier & Power Automate 尖端 详情请见下文。

:::

PDF4me Excel 提取行 Zapier 配置 - 文件、文件名、工作表名称、从 1 开始的行和列范围、包含标题行
只有“文件”带有星号。“第一行”、“最后一行”、“第一列”和“最后一列”使用 Excel 自带的从 1 开始的编号,此处显示为 1、7、1、4。
PDF4me Excel 提取行 - 导出为对象、排除隐藏行、排除隐藏列、区域性
其他选项:导出为对象、排除隐藏行/列( UI 本身显示“排除隐藏列”)和文化。

提取行的主要特点是什么?

  • JSON 输出: 提炼 Excel 结构化数据 JSON (RowData 数组)
  • 灵活范围:指定第一行/最后一行和第一列/最后一列 Excel自己的基于 1 的数字
  • 标题行支持:带有标题行,使用第一行作为 JSON 钥匙
  • 过滤排除隐藏行、隐藏列和空行
  • 数据类型控制:将值导出为文本,以输出全部文本。
  • 导出为对象:结构输出为 JSON 对象或数组

参数

“提取行”操作的完整参数列表。参数名称与以下内容匹配: Zapier 配置 UI 如上图所示。

快速设置清单
  1. 地图 文件Excel来自您的触发器或上一步
  2. (可选)映射 文件名 并设置 工作表名称 (例如,Sheet1)
  3. 第一排最后一行第一栏最后一列 (从 1 开始计数;-1 表示结束)
  4. 包含标题行导出为对象以及其他必要的选项
范围必需的它的作用例子
FileRequiredExcel file to extract rows from. Map from a previous step. Must provide full file content.[2. File from Step 2]
File NameConditionalExcel filename, used for output file identification.add_header_sample_file.xlsx
Worksheet NameConditionalTarget worksheet to extract from. Empty extracts from the first worksheet.Sheet1
Has Header RowConditionalTrue uses the first row in the range as JSON property names.True
First RowConditionalStarting row, 1-based. 1 = Excel row 1.1
Last RowConditionalEnding row, 1-based. -1 = last row with data.7
First ColumnConditionalStarting column, 1-based. 1 = column A.1
Last ColumnConditionalEnding column, 1-based. -1 = last column with data.4
Exclude Empty RowsConditionalTrue skips rows with no data.False
Export Values As TextConditionalTrue exports every value as a string; False preserves native types.False
Hyperlink FormatConditionalHow to represent cell hyperlinks in the output.-
Export As ObjectConditionalControls whether the output is structured as a JSON object or array.True
Exclude Hidden RowsConditionalTrue skips rows hidden in the worksheet.False
Exclude Hidden ColumnsConditionalTrue skips columns hidden in the worksheet. Zapier labels this field "Exclud Hidden Columns".False
CultureConditionalLocale for date/number formatting.en-US

重要的: 仅有的 文件 是必需的。请使用 + 每个字段旁边都有一个按钮,用于映射数据。可以使用“首行/末行”和“首列/末列”功能。 Excel自己的 基于 1 的 编号(第 1 行,A 列 = 1),而不是从零开始的索引。

提取行会返回什么?

PDF4meExcel 行动回报全面 JSON 无缝输出数据 Zapier 工作流程集成。

场地类型它包含什么
documentBase64JSON data as a byte array (serialized RowData).
RowDataArrayExtracted rows as an array of objects, keyed by column name when Has Header Row is True.
SuccessBooleanWhether the extraction completed without error.

例子 JSON 回复

{
"document": "[Base64 JSON Data]",
"RowData": [
{
"Name": "John Doe",
"Age": 30,
"Salary": 50000.50
},
{
"Name": "Jane Smith",
"Age": 28,
"Salary": 55000.00
}
],
"Success": true
}

典型配置

工作流程示例Common Zapier workflow patterns using Extract Rows.
已安排 Excel-到 API 同步
  1. 定时触发器按固定时间间隔运行。
  2. PDF4me 提取行映射文件和文件名,将“有标题行”设置为 True,将“导出值作为文本”设置为 False,以保留原生数字和日期类型。
  3. 循环步骤遍历 RowData 数组,并将每个行对象 POST 到目标位置。 REST API 终点。
新文件加载到数据库
  1. 当一个新的 Excel 文件已上传至存储文件夹。
  2. PDF4me “提取行”将“第一行”设置为 2 以跳过标题行,“最后一行”设置为 -1 以提取其余数据,“排除空行”设置为 True。
  3. 数据库步骤将 RowData 数组批量插入到 SQL 桌子。
处理前进行格式验证
  1. 每日触发器会在下游处理作业之前运行。
  2. PDF4me “提取行”将“导出值作为文本”设置为 True,以便每个值(包括日期和数字)都以纯字符串的形式出现,用于模式检查。
  3. 在数据继续处理之前,过滤器或代码步骤会根据预期格式验证每一行的文本。

实用技巧

File: (Exists but not shown) causes errors
Select the mapping option that provides the file's full binary content instead of a reference. See Zapier & Power Automate Tips for the exact steps.
Row and column numbers start at 1, not 0
First Row 1 is Excel row 1 and First Column 1 is column A. This trips up developers used to zero-based indexing.
Use -1 for Last Row or Last Column, not a guessed high number
Setting -1 tells PDF4me to extract through the last row or column that actually has data, so you do not need to know the exact size in advance.
Export Values As Text is for validation, not display
True is useful when you need to pattern-match every value as a string. For most database or API loads, keep it False to preserve native types.
The Zapier field is labeled "Exclud Hidden Columns"
This is a real label in the Zapier UI, not a typo in this documentation. Both Exclude Hidden Rows and Exclude Hidden Columns default to False.

速查表

场地价值
ActionExtract Rows
File[Mapped from previous step]
Worksheet NameSheet1
First Row / Last Row1 / 7 (1-based, -1 = to end)
First Column / Last Column1 / 4 (1-based, -1 = to end)
Has Header RowTrue
Export Values As TextFalse (preserve types)

常见问题

How do I convert Excel rows to JSON in Zapier?+
Add the PDF4me Extract Rows action to a Zap, map the Excel file from a previous step using the full-content option, set Worksheet Name and the row/column range, then use the RowData array from the response in the next step. See Zapier's guide to working with files for how file fields pass between steps.
Are First Row and First Column 0-based or 1-based?+
They are 1-based, matching Excel's own row and column numbers. First Row 1 is Excel row 1 and First Column 1 is column A. Use -1 for Last Row or Last Column to extract through the end of the data.
Can I extract only a specific range of rows and columns?+
Yes. Set First Row, Last Row, First Column, and Last Column to the exact range you need, for example First Row 1 and Last Row 7 for the first seven rows. Leaving Last Row or Last Column as -1 extracts through the end of the data.
Is File the only required parameter?+
Yes. In the Zapier configuration, only File is marked required. File Name, Worksheet Name, and every range, filtering, and formatting field are optional.
Does Export Values As Text change the extracted data?+
It changes the JSON data types only, not the underlying Excel values. Set it to True to get every value as a string, or False to preserve numbers, dates, and booleans as native JSON types.

相关操作

在其他平台上执行相同任务

行业应用案例及应用

  • API数据源按计划将 Excel 行提取为 JSON 格式,并通过 POST 请求发送到 REST API,以实现系统集成。
  • ETL管道将 Excel 数据加载到数据仓库,并保留数据类型和转换关系
  • 系统迁移将旧版 Excel 数据提取为 JSON 格式,以便迁移到现代云系统。
  • 数据同步将 Excel 主数据提取并同步到多个下游系统
  • 日志分析将 Excel 中的操作日志提取到分析平台进行监控

获取帮助