0

I am new to javascript and I was wondering if you anyone can help me with this issue. I have the following string after using papa parse:

var csv_file = Papa.unparse({
                  "fields": ["Column 1", "Column 2"],
                  "data": [
                    ["foo", "bar"],
                    ["abc", "def"]
                  ]
                }); 

Now I'm trying to save the csv_file as a .csv file on my local machine (not downloading in the browser only saving it so I can see it in my directory) by giving it a specific name without using node.js. Is this possible?

Thank you.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Artemis
  • 15
  • 3
  • 1
    This isn't possible as the JavaScript runs in a browser, you'd need to download it from the browser. – DibsyJr May 31 '23 at 09:48
  • 1
    @DibsyJr it is possible to save files to a local machine with the File System Access API. – user15517071 May 31 '23 at 09:53
  • 1
    @user15517071 I stand corrected, have never heard of that API before, thank you for teaching me something new today. – DibsyJr May 31 '23 at 10:37

0 Answers0