Format text data to create Excel spreadsheet

Describe the problem/error/question

I’m successfully scraping data from an email but need to format it in such a way that I can create an Excel Spreadsheet and email it out to accounting. I tried creating a CSV file and converting that to Excel and that didn’t work so I tried creating an array and that didn’t work either.

Also I can’t get the file to attach to the email.
UPDATE: I’m getting the attachment in my email now.

What is the error message (if any)?

No error message, it’s just not creating the spreadsheet the way I want it.

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

I get 2 rows with 1 column in my excel file which is not what I want. Example:
Row #1 Cell A: csv
Row #2 Cell A: [[“M300TEE”,“7”,“$11.11 “],[“FC300TB”,“5”,”$22.22 “],[“M302G”,“3”,”$33.33”]…

I’m expecting 3 columns:

Part    | Quantity | Price
M300TEE |        7 | 11.11
FC300TB |        5 | 22.22
M302G   |        3 | 33.33

Information on your n8n setup

  • n8n version: 1.41.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @tim.berneman, maybe try using the Split Out node after the code node?

1 Like

That’s exactly what I did last night and that worked. The only issue I have left is when I Convert to XLS I get “0” , “1”, and “2” for my column headers instead of “Part”, “Quantity”, and “Price”. Any suggestions to fix that?

Thanks for the help @aya!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.