0

I found the following post: How do I export html table data as .csv file?

I've given the first example a try ("Option 1") and it's great... it pops up a window with all my data in CSV format, but I need to give my users an option to actually save a physical file with the data... not just the pop up window.

I'm wondering how I can modify the code to also allow for saving of the file?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
dot
  • 14,928
  • 41
  • 110
  • 218
  • I wouldn't mess with that code if I were you, maybe try one of these libs? https://code.google.com/p/jquery-csv/ or http://papaparse.com/. Good luck. – Yeysides Apr 10 '15 at 22:17
  • @Yeysides i just tried the demos and it parses json to csv... and vise versa.. but it doesn't let you save to a file from what I can see – dot Apr 10 '15 at 22:35
  • well once you get the file parsed you can do this and have the users download that file: http://stackoverflow.com/questions/3665115/create-a-file-in-memory-for-user-to-download-not-through-server – Yeysides Apr 10 '15 at 22:37
  • I apologize if this is not what you were trying to do – Yeysides Apr 10 '15 at 22:41

0 Answers0