Help

Re: CSV File import without input.fileAsync()

Solved
Jump to Solution
2781 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Matheus_Bergamo
5 - Automation Enthusiast
5 - Automation Enthusiast

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 Solution

Accepted Solutions

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.

See Solution in Thread

5 Replies 5
Matheus_Bergamo
5 - Automation Enthusiast
5 - Automation Enthusiast

@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.

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.

Thank you! I’m going to try that!