From 951b81e09a47cc4eed475f1faa46cedacdd120a5 Mon Sep 17 00:00:00 2001 From: IKAR0S Date: Tue, 14 Oct 2014 12:48:16 +0100 Subject: [PATCH] Sugestion This change will export regular 2D charts as an Excel table without duplicated columns. Unfortunately I believe this hack can not be applied to more complex chart types (more dimensions), but since I don't use those in my web site I didn't develop a generic fix. I leave this piece of code here as food for thought. Thanks. --- export-csv.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/export-csv.js b/export-csv.js index a98cdc4..646d8af 100644 --- a/export-csv.js +++ b/export-csv.js @@ -55,6 +55,9 @@ line = []; for (col = 0; col < columns.length; col = col + 1) { line.push(columns[col][row]); + // Export Category column only once + if (col % 2 == 1) + col++; } csv += line.join(itemDelimiter) + lineDelimiter; }