Parse xls attachment(from IMAP)

I’m trying to parse Xls attachment(from IMAP) to process contents from a specific column. I tried various approaches like:

  • Read binary file
  • function
items[0].json.attachmentIndex = Object.values(items[0].binary).findIndex(key => key.mimeType === "application/");
return items;

the binary from IMAP is still shown as an object. I need it as JSON or some other readable format so that I can use the data further in the workflow.


Hey @nixonsam, did you have a look at the Spreadsheet File node? It should be able to read XLS files.

tried that too, no luck.

Could you try removing the expression from the “Binary Property” field and instead simply enter the name of your IMAP binary data object (probably something like attachment_0)?


that worked, Thanks a lot!

1 Like

Awesome, glad to hear and many thanks for confirming :slight_smile:

1 Like

Thank you again. This saved me after a few hours trial / error. if I may ask, what would be logic to put name or the full object so to anticipate on other scenarios ?

Hey @Phonitel,

It is probably best to open a new thread :slight_smile:

When you say name or full object what do you mean?