Page 1 of 1

Updating an existing csv

Posted: Wed Apr 12, 2017 2:11 pm
by amarschner@masters
Each time an export is performed, a new speadsheet is created. Is there a way to update/add to an existing spreadsheet.
Users need to create 1 spreadhseet from multiple exports.
Al Marschner
Masters Gallery Foods, Inc.

Re: Updating an existing csv

Posted: Wed Apr 12, 2017 2:40 pm
by Scott Klement
When an export is performed a CSV file (which isn't technically a spreadsheet) is exported from the grid. The user is asked to download/save it to their PC.

You ask about modifying an existing sheet. Are you asking for it to do this?

1) Ask the user to upload a CSV file
2) Load that CSV file into a grid
3) Allow your code to modify the grid
4) Export the grid again to create a new CSV file

Is that what you're asking? If so, it can be done by using the File Upload widget to upload the CSV, and then you can write code (we don't do this automatically, sorry) that will read the CSV file and load it into your subfile. From there you can modify the subfile and export it again.

Remember, this tool is entirely a feature of the grid/subfile widget. So if you're looking for a tool that will allow modification of a spreadsheet (vs. exporting our subfile grid) then you are looking in ths wrong place, that is not what our tools are for.

Instead, you could cosnider using POI, which is a general tool for working with Office documents. It doesn't understand CSV format, but it does understand Excel's native XLS and XLSX formats. (Which are better, anyway.) I've written about these tools, you can find information here:
http://www.scottklement.com/poi/

Re: Updating an existing csv

Posted: Thu Jul 19, 2018 9:24 am
by TaskForce_Kerim
If I understand Al correctly, they want to actually append a spreadsheet to another spreadsheet that exists on the user's file system, i.e. merging multiple CSV files.

That is not possible.

Scott's suggestion is a possible workaround. Or you could try a simple online tool like this one: http://merge-csv.com/

Your users generate multiple CSV files and then merge them with the aforementioned tool.