ce icon indicating copy to clipboard operation
ce copied to clipboard

Downloading with headers.

Open illyamarinov opened this issue 7 years ago • 5 comments

Hello, @paulhodel. I got issue when need to download a table with headers. I checked the example (https://bossanova.uk/jexcel/v3/examples/import-data), but even in that example headers don't download with the table. Example in the second version (https://bossanova.uk/jexcel/v2/examples/creating-a-table-from-an-external-csv-file) works fine. I'm using "download()" method and "csvHeaders: true" property, but it not works. Please help)

illyamarinov avatar Jul 22 '19 13:07 illyamarinov

Please use: table.download(true);

Please bear in mind: if you are using formulas THIS can cause problems in the formulas references since the first ROW should be not counted.

pphod avatar Jul 27 '19 12:07 pphod

yes if we are using formulas THIS can cause problems in the formulas references since the first ROW should be not counted.

so if we change the copy method return statement like below.

line no 5247 return str; to return strLabel then it works fine. It return calculated value not formula which resolved the problem

NomanChali avatar Sep 30 '19 10:09 NomanChali

You don't need to change the code. You can use copyCompatibility: true to parse the formulas before downloading.

pphod avatar Sep 30 '19 11:09 pphod

yes i i tried by setting copyCompatibility: true but still i face formula parsing problem

you check here : https://jsfiddle.net/e6nbajfk/

NomanChali avatar Sep 30 '19 11:09 NomanChali

You don't need to change the code. You can use copyCompatibility: true to parse the formulas before downloading.

yes i i tried by setting copyCompatibility: true but still i face formula parsing problem

you check here : https://jsfiddle.net/e6nbajfk/

NomanChali avatar Oct 01 '19 09:10 NomanChali