Spreadsheet 1 add-on and CSV files

For Vaadin Spreadsheet 1, is it possible to load a CSV file? Basically, we produce a CSV file and we want to load it into Spreasheet so that users could directly edit the data inside the website. Right now they have to:

  1. Download the data into a CSV file
    a. Produce a CSV file from data
    b. Based on this file name, download it
  2. Edit the CSV file ( no special formatting because CSV and we need it as CSV for next step )
  3. Upload CSV file to update data

We want to cut down on some of those steps, and my boss really wants to take advantage of the fancier Spreadsheet features (like formulas). So one idea I had was:

  1. Read CSV file produced currently, but instead of downloading it, load it into Spreadsheet
  2. Let users edit as they normally would in Excel
  3. On “submit”, send changes back to backend. This would of course require me to go through each line in Spreadsheet, and they parse Cells into my XML format. Or it would take me outputing a CSV file to the “Upload” directory for later processing. Not sure yet what I would do here.

Yes, far more complex for the developers, but less steps for users, and looks a little better. Any other ideas would be helpful as well. We just need a way to mass change data, and I would just assume not waste the current structure we have.

Apache POI (which is the backing server-side library for Spreadsheet) doesn’t support CSV as an input/output format as far as I know, but it shouldn’t be too difficult to convert between Worksheet and CSV data manually. A quick googling gave me this: https://gist.github.com/robertchong/11071949 which looks like it could be helpful. Apache also has a CSV library in Commons: http://commons.apache.org/proper/commons-csv/