DiegoZoracKy / convert-excel-to-json

Convert Excel to JSON, mapping sheet columns to object keys.
MIT License
289 stars 92 forks source link

Error: ENOENT: no such file or directory, open 'https://[FILE_URL]' #38

Closed rmoylan closed 4 years ago

rmoylan commented 4 years ago

When targeting the file locally, I have no issue, but when I target the server hosted version, I get the following error. Is there something different I need to do when the file is hosted?

Error: ENOENT: no such file or directory, open 'https://[FILE_URL]'

This is my code const movementOrders = excelToJson({ sourceFile: args.url, sheets: ['Data'] });

Thanks!

DiegoZoracKy commented 4 years ago

Hi @rmoylan,

Yes, you would need to download the file first, and then when the download is finished, you can pass the local file path to the lib. It's not prepared to handle URLs.

rmoylan commented 4 years ago

@DiegoZoracKy Got it thanks!