跳到主要内容

更新行 Excel - 数据修改器 Make

PDF4me 更新行 Excel 是一个 Make 该模块使用以下方式修改 .xlsx 或 .xls 工作簿中的现有行: JSON 数组,自动将属性名称与列标题匹配。可用于同步数据库更改、刷新仪表板或更新 CRM 记录 Excel 不插入或删除行。

本模块的功能

PDF4me 更新行 Excel 使用以下方式修改现有行中的单元格 JSON 数组,不插入或删除行。每个数组中的属性名称 JSON 对象会自动与列标题匹配,并可选择自动将字符串转换为数字或日期、进行特定于区域性的解析、自定义日期/数字格式设置,以及控制如何处理空值。

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

我如何验证我的身份 Make 设想?

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

您不容错过的重要事实

仅限就地更新
该模块不会插入或删除行。它只会覆盖已存在行中的单元格,从起始行开始,并按列标题名称匹配。
JSON 输入必须是一个数组
即使是单行更新也必须用数组括号括起来: [{"Name":"John"}]没有括号的裸对象会导致错误。
类型转换是可选的,并非自动进行。
要使日期格式、数字格式和区域性名称生效,“转换数值和日期”必须设置为“是”。如果设置为“否”,则值将按原样写入。
使用 PDF4me Excel 更新工作表模块中的行,该模块配置了连接、文件类型为“映射”(已映射文件名和文档)、工作表名称为 Sheet1、Json 输入、起始行数为 2、转换数值和日期设置为“是”、日期格式为 yyyy-MM-dd、数值格式为 N2、忽略属性标题为“否”、忽略空值为“否”以及区域性名称为 en-US。

将文件设置为映射,从上一个模块连接文件名和文档,然后提供 Json 输入和行/类型转换选项。

参数

必需的: 必须提供连接号、文件名、文档和 JSON 输入。 Json Input 必须是 JSON 不支持对象数组,不支持单个对象。所有其他参数均为可选,如果留空,则使用模块默认值。

范围必需的它的作用例子
ConnectionRequiredPDF4me API connection. Click Add and paste your API key if connecting for the first time.My PDF4me Excel connection
File NameRequiredFilename of the Excel workbook including extension, used for output file identification.sales_data.xlsx
DocumentRequiredExcel file buffer mapped from a preceding module such as Dropbox Download a File or Google Drive.[Buffer from Get File]
Worksheet NameOptionalName of the worksheet to update. Defaults to Sheet1 if left blank. Worksheet matching is case-sensitive.Sheet1
Json InputRequiredJSON array of objects, one object per row to update. Property names are matched to column headers automatically.[{"Product":"Widget","Price":55.99}]
Start RowOptional1-based row number where updates begin. Row 1 is usually the header row, so data updates typically start at row 2.2
Start ColumnOptional1-based column offset used for header matching, allows skipping initial columns.1
Convert Numeric And DateOptionalYes converts JSON strings to Excel numbers and dates using Date Format and Numeric Format. No writes values as-is.Yes
Date FormatOptionalExcel date format pattern applied when Convert Numeric And Date is Yes.yyyy-MM-dd
Numeric FormatOptionalExcel numeric format pattern applied when Convert Numeric And Date is Yes.N2
Ignore Attribute TitlesOptionalYes makes JSON property name matching case-insensitive against column headers.No
Ignore Null ValuesOptionalYes skips updating any cell whose JSON value is null, preserving the existing cell content. No overwrites it as empty.No
Culture NameOptionalCulture code used to parse incoming date and number strings before conversion, important for international data.en-US

输出字段

场地类型它包含什么
NameStringOutput Excel filename, matches the File Name input.
Doc DataBufferThe Excel document with the modified rows, in buffer format, ready to upload or attach.

如何在代码中设置更新行 Make

  1. 添加 PDF4me更新工作表中的行 致你 Make 设想。
  2. 选择 联系 (或点击) 添加 用你的 PDF4me API 钥匙)。
  3. 在下面 文件, 选择 地图 电线 文件名文档 来自之前的模块(Dropbox、Google Drive 或 HTTP)。
  4. 工作表名称 如果不是 Sheet1。
  5. 建造 JSON 输入 数组,因此每个对象的属性名称与列标题匹配,每行更新一个对象。
  6. 起始行 到第一行数据(通常 2 如果第 1 行包含标题)。
  7. 使能够 转换数值和日期 并设置 日期格式 / 数字格式 如果你的 JSON 值是应该变成的字符串 Excel 数字或日期。运行该方案后,更新后的工作簿将以缓冲区的形式返回。

典型配置

工作流程示例Common Make scenario patterns using Update Rows in Excel.
计划数据库到-Excel 同步
  1. 计划触发器按固定时间间隔运行,以获取自上次同步以来已更改的记录。
  2. A SQL 查询或 API 调用将更改后的记录格式化为 JSON 与工作表列标题匹配的数组。
  3. 获取文件功能会检索主文件。 Excel 从 Dropbox 或 Google Drive 生成报告。
  4. 更新行从第 2 行开始写入新值,并启用“转换数值和日期”功能。
  5. 更新后的工作簿将上传回原位置,替换之前的版本。
CRM 机会更新
  1. 当……时,webhook 会被触发。 CRM 商机记录已更新。
  2. 该场景构建了一个 JSON 包含该商机的最新阶段、金额和成交日期的对象。
  3. 获取文件功能检索商机跟踪工作簿。
  4. 更新行会修改匹配的行,并将“忽略属性标题”设置为“是”,以实现灵活的标题匹配。
  5. 更新后的工作簿将保存回销售团队的共享存储空间。
库存水平刷新
  1. 当一个或多个 SKU 的库存数量发生变化时,库存系统事件就会触发。
  2. 该方案将更改后的 SKU 和数量格式化为 JSON 大批。
  3. 获取文件功能从中检索主库存工作簿 SharePoint
  4. 更新行会写入当前库存水平,并将“忽略空值”设置为“是”,以保留不相关的列。
  5. 更新后的库存工作簿已保存回 SharePoint 提高仓库可视性。

实用技巧

Json Input must be an array, always
Even a single-row update needs array brackets. A bare object like {"Name":"John"} errors, wrap it as [{"Name":"John"}].
Start Row usually means row 2
Row 1 typically holds column headers. Set Start Row to 2 to update the first data row without overwriting headers.
Type conversion needs the toggle on
Date Format, Numeric Format, and Culture Name only apply when Convert Numeric And Date is Yes. Left at No, JSON values are written verbatim as text.
Header matching is case-sensitive by default
If your JSON property names differ in case from the column headers, set Ignore Attribute Titles to Yes rather than renaming every header.
Null values overwrite by default
Without Ignore Null Values set to Yes, a null in your JSON blanks the existing cell. Enable it when you only want to update the fields you actually send.
Culture Name affects parsing, not just display
Set Culture Name to match how your source data formats dates and decimals (e.g. de-DE for comma decimals), otherwise conversion can misread values.

速查表

场地价值
ModuleUpdate Rows in a worksheet
ConnectionPDF4me API key
Default worksheetSheet1
Json Input shape[{"Column":"Value"}, ...] (array, always)
Typical Start Row2 (skips header row)
Type conversion toggleConvert Numeric And Date = Yes
Default date/numeric formatyyyy-MM-dd / N2
Default cultureen-US

常见问题

Does Update Rows insert or delete rows?+
No. The module only modifies cells in rows that already exist in the worksheet. It never inserts new rows or deletes existing ones. Use a different PDF4me Excel module if you need to add or remove rows.
What format must Json Input be in?+
Json Input must be a JSON array of objects, even when updating a single row. A bare object such as {"Name":"John","Age":31} without array brackets causes an error, it must be wrapped as [{"Name":"John","Age":31}].
How does header matching work?+
Each object in the Json Input array has its property names matched against the column headers in the target worksheet. Rows are updated sequentially starting from Start Row, with Start Column controlling any header offset.
What happens to null values in the JSON?+
By default, a null value in the JSON overwrites the corresponding cell as empty. Set Ignore Null Values to Yes to skip updating any cell whose JSON value is null, which preserves the existing content in that cell.
Can I control how dates and numbers are formatted?+
Yes. When Convert Numeric And Date is set to Yes, Date Format and Numeric Format apply Excel formatting patterns such as yyyy-MM-dd or N2, and Culture Name (for example en-US or de-DE) controls how the incoming strings are parsed before conversion. See <a href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings" target="_blank" rel="noopener noreferrer">Microsoft's numeric format string reference</a> and <a href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings" target="_blank" rel="noopener noreferrer">custom date format reference</a> for the full pattern syntax.

行业应用案例及应用

  • CRM 最新机会修改商机行 Excel 包含最新状态、金额和结算日期
  • 广告系列效果刷新更新广告系列指标行,包括当前的展示次数、点击次数和转化次数。
  • 潜在客户评分更新刷新潜在客户评分数据 Excel 营销自动化跟踪表
  • 客户数据库同步更新客户记录行,包含最新的联系信息和购买历史记录
  • 销售预测更新使用更新后的管道数据和中标概率修改预测行

相关操作

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

获取帮助