nagarajanchinnasamy / subtotal

A JavaScript plugin for PivotTable.js. It renders subtotals of rows and columns with the ability to expand and collapse rows and columns
http://nagarajanchinnasamy.com/subtotal
MIT License
92 stars 46 forks source link

PivotTable Data Export In Excel Download #55

Open Kishan1824 opened 6 years ago

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

We need to export pivot data in excel without those expand/collapse arrow & with all table border as it shown in html.

Waiting for positive reply.

nagarajanchinnasamy commented 6 years ago

@KishanManali1824 could you pls explain how you are exporting the data. Thanks.

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

Here is my code that currently i am using to export to excel.

var uri = 'data:application/vnd.ms-excel;base64,', template = '

{table}
', base64 = function (s) { return $window.btoa(unescape(encodeURIComponent(s))); }, format = function (s, c) { return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; }) };

function (tableId, worksheetName) { var table = $(tableId), ctx = { worksheet: worksheetName, table: table.html() }, href = uri + base64(format(template, ctx)); return href; } Waiting for positive reply.

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

Please give any update. Waiting for positive reply.

nagarajanchinnasamy commented 6 years ago

@KishanManali1824

You basically are downloading the outer html of the pivot table element. By this method, i dont think you can eliminate the arrows in labels.

We need to think of another method. Right now am not clear what would that be!!!

Kishan1824 commented 6 years ago

Ok.Think on it. What about my other issue of showing row/column sub-total header label .

Is it possible.

On Dec 15, 2017 3:13 AM, "Nagarajan Chinnasamy" notifications@github.com wrote:

@KishanManali1824 https://github.com/kishanmanali1824

You basically are downloading the outer html of the pivot table element. By this method, i dont think you can eliminate the arrows in labels.

We need to think of another method. Right now am not clear what would that be!!!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagarajanchinnasamy/subtotal/issues/55#issuecomment-351844897, or mute the thread https://github.com/notifications/unsubscribe-auth/AS5TBLABeivRDj1HduYiHYO5TdSebEg1ks5tAZZygaJpZM4Q6lBG .

nagarajanchinnasamy commented 6 years ago

@KishanManali1824

After getting the outer html, u can search n remove arrows. Hope that helps :-)

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

Ok.Will Check it.

Kishan1824 commented 6 years ago

actualreportdata

actualreportdata

Please see the difference between two image of my report. In actual print its ok, but when i export that report in excel, it looks like in given image. Please help in this issue.

Waiting for positive reply.

Kishan1824 commented 6 years ago

Respected @nagarajanchinnasamy

Please help in this issue... Waiting for positive reply.

Kishan1824 commented 6 years ago

@nagarajanchinnasamy

Respected sir, Please provide any input in this issue.. Its been very important one in this development.

Waiting for positive reply.