Hello everyone!
I’m hosting N8N locally on a server in my company.
I want to build a workflow but I’m stuck on a step that seems simple, yet I can’t find a solution. Let me explain:
Goal of the workflow:
As input, I have a form that uploads a .xls or .xlsx file.
This Excel file can contain multiple sheets within the same file.
The goal is to read the file in its entirety and create a new separate file for each sheet of the original Excel.
So, the final output should be multiple files, each containing only a single sheet.
Problem:
When I use the node “Extract from XLS” or “Extract from XLSX”, it only returns the first sheet of the file as JSON — as if the other sheets don’t exist.
Hello,
Thanks a lot for your reply!
This indeed allows me to extract multiple sheets when I already know their names, which is a great start!
Do you know if there’s a way to extract each sheet even if I don’t know their names in advance?
For example, instead of relying on the sheet name, it would take into account the sheet index (Sheet 1, Sheet 2, etc.).
I’m asking because in my workflow, the original Excel file can contain several sheets, but their names may change from one file to another.
Yes you can using this trick. An excel file is simply a zip archive with a bunch of xml files inside. By reading the content of xl/workbook.xml you can get a list of the sheet names. Once you have this you can process as needed in a loop. Let me know if you need me to complete the sample in actually writing out separate excel files per sheet or whether you want to process each sheet from here
Here is the more complete version to read each sheet dynamically. This excludes writing each sheet to a new file. Not sure if this is enough for your requirement or whether you actually want to split the file into multiple files?
Are you using a self hosted instance of n8n or the cloud version? Technically you always have access to a host even if it is in cloud, so I would just store the file temporarily, process and then delete it. If you’re asking if you can do this on a remote host, then the node to use is the “ssh - execute command”
I’m working on an n8n workflow that processes uploaded XLSX/CSV files from a form submission. The issue is that the Read Excel Workbook node isn’t reading the binary files properly after upload. The workflow should extract data, convert XML to JSON, split items, loop through them, and extract from sheets, but it’s failing at the Excel reading step. Could you please guide me on how to properly configure the binary data flow and ensure the entire workflow runs correctly from form submission to final extraction?
Yes, Im using a remote host, thats why im confused about it. And Im trying to do the same thing as Raja_Asad, upload XLSX/CSV files from a form submission and then read all the content in all of the sheets so I can work with it. Im not sure how to set the path for the “Read Excel Workbook” node using the remote host.
See if my last answer helps your case as well. You just need to adjust the filename path and make sure the directory exist. if you struggle i can try and create an example
hi thank you for ur reply in n8n now issues this and i need one more help suppose in n8n in quick book data extract first time 5 invoice show and second time 10 but i need only 5 new invoice how to fix this and guide me in data extract and guide me this
Just make sure the directory you’re trying to store the file in exists. Either create it on your server or run a shell command before the store step to make sure the directory exists.