diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/widgets/FreeFormTableController.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/widgets/FreeFormTableController.js index ec8e6788ce70213e6b2cd3adb0de4229e023dcf8..203bee0d2c54ed6f4a262c5987699c199ebfd4b9 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/widgets/FreeFormTableController.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/widgets/FreeFormTableController.js @@ -117,36 +117,36 @@ function FreeFormTableController(sample, isEnabled) { var csv = ""; //Name Conversion - csv += "#Name\n"; - csv += tableModel.name + "\n"; + csv += "#Name;\n"; + csv += tableModel.name + ";\n"; //Mini Conversion - csv += "#Mini - Rows\n"; + csv += "#Mini Rows;\n"; for(var i = 0; i < tableModel.modelMini.rows.length; i++) { - csv += tableModel.modelMini.rows[i] + "\n"; + csv += "\"" + tableModel.modelMini.rows[i] + "\"" + ";\n"; } - csv += "#Mini - Columns\n"; + csv += "#Mini Columns;\n"; for(var i = 0; i < tableModel.modelMini.columns.length; i++) { - csv += tableModel.modelMini.columns[i] + "\n"; + csv += "\"" + tableModel.modelMini.columns[i] + "\"" + ";\n"; } //Detailed Conversion - csv += "#Detailed\n"; + csv += "#Detailed;\n"; for(var i = 0; i < tableModel.modelDetailed.length; i++) { if(i != 0) { csv += "\n"; } for(var j = 0; j < tableModel.modelDetailed[i].length; j++) { if(j != 0) { - csv += ", "; + csv += ";"; } - csv += tableModel.modelDetailed[i][j]; + csv += "\"" + tableModel.modelDetailed[i][j] + "\""; } } //Download file var blob = new Blob([csv], {type: 'text'}); - saveAs(blob,'csv.txt'); + saveAs(blob,'exportedTable.csv'); } //