I have HTML table that i want to export as excel , that works!
I needed to show total value of one column on top of the page (and it works on browser) i did it with jQuery.
Here is were i add total value:
echo '<p style="display:inline-block;" class="total-title"></p>';
Here is how i add value:
$('p.total-title').html(' total: <?=$total;?>');
And here are my headers:
header("Content-Disposition: attachment; filename=print_report(".date('Y-m-d').").xls");
header('Content-Description: File Transfer');
All other data is exported but just this jQuery added content is not showing!
Why it works when i remove headers? And why could it not work in export?
What possible fixes are here?