CSV File import without input.fileAsync()

Hello,

I´m using this code to get my csv file, parse and import to table:

let csvFile = await input.fileAsync(
‘Pick a CSV file to upload’,
{allowedFileTypes: [’.csv’], hasHeaderRow: true}
);

What I am not figuring it out is how to make that is always the same file, without me needing to choose one - without input.

If anyone knows how to, I would really appreciate.

1 Like

@kuovonne I saw you in so many posts helping people… Maybe you can help me too =D
Thanks!

Script app does not have direct access to the local file system. The only way for scripting to access a local file is via input.fileAsync, which requires user involvement.

This is not the answer you wanted, but this is part of the limitations of scripting.

4 Likes

Thank you for answering! =D
And is not possible to access via URL (like dropbox link)?

Accessing files on the internet is totally different from accessing the local file system.

Scripting can access files on the internet, if they are publicly available (don’t require a login), are the actual file (versus a viewer), and don’t require redirects. Use JavaScript fetch.

1 Like

Thank you! I’m going to try that!

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