ng-table-export icon indicating copy to clipboard operation
ng-table-export copied to clipboard

Exported file used ";" instead of "," as separator

Open UMAknow opened this issue 9 years ago • 5 comments

When opening the file with Excel on a Mac, it works just fine, but on a PC, Excel expects the separator to be a comma, not a semicolon.

An easy fix is to change a line in the code such as to insert 'sep=;' at the very top of the file. Then it works fine both on Excel Mac and Windows.

generate: function() {
    data = 'sep=;' + "\n";

UMAknow avatar Aug 12 '14 20:08 UMAknow

+1

TheKojuEffect avatar Nov 16 '14 07:11 TheKojuEffect

+1

juniorplenty avatar Dec 19 '14 00:12 juniorplenty

+1

shoobm avatar Dec 22 '14 12:12 shoobm

In my opinion, this addon should not regard and deal with separators. May be it can take the separator from outside and can use a default one if nothing specified.

nerezo avatar Feb 04 '15 12:02 nerezo

Since this repo was not being updated, we forked it and have changed the default separator to be comma with the option to specify any others via a new custom attribute of separator

Check out the plunker that shows this in action - http://plnkr.co/Y0r33F

Here is the fork (that we have renamed as well to publish into bower) - https://github.com/kollavarsham/ng-table-to-csv

Also, we would welcome any other suggestions that could improve the library.

floydpink avatar May 18 '15 05:05 floydpink