Hello there!
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:
<script>
$(document).ready(
function() {
$('p.total-title').html(' total: <?=$total;?>');
}
);
</script>
And here are my headers:
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=print_report(".date('Y-m-d').").xls");
header("Pragma: no-cache");
header("Expires: 0");
header('Content-Description: File Transfer');
header("Content-type: application/vnd.ms-excel");
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?
Thanks