Commit 46fe9a16 by Joel Smith Committed by Torkel Ödegaard

Update file_export.ts (#5325)

Prepended first line to export file containing
`sep=;\n`
which I believe should be all that is required for Excel to interpret the CSV file as semicolon delimited.
parent 79eb971f
......@@ -5,7 +5,7 @@ import _ from 'lodash';
declare var window: any;
export function exportSeriesListToCsv(seriesList) {
var text = 'Series;Time;Value\n';
var text = 'sep=;\nSeries;Time;Value\n';
_.each(seriesList, function(series) {
_.each(series.datapoints, function(dp) {
text += series.alias + ';' + new Date(dp[1]).toISOString() + ';' + dp[0] + '\n';
......@@ -15,7 +15,7 @@ export function exportSeriesListToCsv(seriesList) {
};
export function exportSeriesListToCsvColumns(seriesList) {
var text = 'Time;';
var text = 'sep=;\nTime;';
// add header
_.each(seriesList, function(series) {
text += series.alias + ';';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment