How to insert a row in a Microsoft Office 365 Excel Online file

Hi All.

I Can’t find how to insert a table row in a Microsoft Excel worksheet.
I need to correlate the columns with the values? How?
When I create an Excel node with an “add row” operation and run it, I get the result like bellow image.

If I click in the “Add fields” button, it shows the bellow option

image

What I need to write at the experession field?

This is my workflow:

Information on your n8n setup

  • **n8n version: 0.163.1
  • **Database you’re using (default: SQLite): Default
  • **Running n8n with the execution process [own(default), main]: Unknown
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]: Unknown

I also tried adding the Merge node, but have the same result, I don’t found how to correlate table column and values.

Hi @valderes, to correlate an n8n field with an Excel 365 column, you need to make sure they both have the same column header.

So if your Excel column is called foo

image

that’s also how your column/key in n8n would have to be called:

The index value wouldn’t need to be set unless you want to insert the new row at a specific position.

Also it’s worth keeping in mind that Excel doesn’t immediately show the newly inserted data, so you might want to reload the page when checking the results.

when you say: “you need to make sure they both have the same column header.”
Are you referring to the output of the previous node? In my case the webhook.

If yes, this is my webhook output

And this is my table.

Apparently, the table header has the same name as the body output of the webhook.

In the table, I don’t need some fields at the webhook and the “Status” column is for internal use.

So it looks like in your webhook data the Name field is nested under body. You could use a Set node in front of your Excel node, this let’s you specify which columns you want to keep when enabling the Keep Only Set option:

Simply enter the column name in the Name field, then in the Value field using an expression such as {{ $json.body.Name }} to read the Name field inside body from your previous node.

Thankou wery much, @MutedJam. With the “Set” node it works.

1 Like

Sweet, thanks for confirming!

I also can use another excel node with “get column” operation before the “Set” node.