i am trying to create an excel report file to download
i have saw few examples in this site and work with them,
this is whats going on:
main.php have a form that the user choose date to extract his report,
then with ajax i return the table affter being generated from mysql.
the code that i echo to the ajax request is a <table> tag.
the problem is that affter i echo the table i also want to echo the excel,
Expand|Select|Wrap|Line Numbers
- if($xls_file=="1"){//if the user want excel file aswell
- $xlsxls = header("Content-type: application/msexcel");
- $xlsxls .= header("Content-Disposition: attachment; filename=xldoc.xls");
- $xlsxls .= $final;//thats the <table> that ajax echo
- echo $xlsxls;
- }
is there other solution?