Extract multiple sheet names from excel file

Hey so i have following Problem:
I currently want to extract the sheetnames of an Excel File, that ive downloaded from Google Drive/ other sources. Im using the n8n cloud version and therefore didnt find any soulutions, that are not involvin Azure or Nodes, that dont exist for me.

Hi!
I managed to solve this using the following workflow. I’m not sure if it’s the best approach, but it works:

  1. Take the XLSX file (binary);

  2. Convert it to a Base64 string;

  3. Run a Python code that parses the file and extracts the sheet names.

Hope it helps!

Thank you for your help, but n8n doesnt allow libary imports that are being used in your code node, does it?

You’re right, n8n Cloud does not allow library imports, which makes this problem harder to solve. But since you’re using Google Drive and want to extract sheet names from XLSX files (Excel Files), I thought about another approach you could take.

You can use the Google Sheets API (easy to set up) together with an HTTP Request node and follow these steps:

  1. Get the ID of the Google Sheets file (you can copy it from the Share button inside Google Sheets or Google Drive);

  2. Use an HTTP Request node to call the Google Sheets API with that ID;

  3. Use a Code node to clean the API response and extract the sheet names.

Requirements: The file must be a Google Sheets document. If your file is still an XLSX, you will need to convert it manually inside Google Drive or create a small workflow to upload the XLSX and convert it into a Google Sheets file before using the steps above.

So… that’s the only thing that I could think of to solve your problem, hope it helps!