I'm trying to create a simple reporting system, which can output either HTML or export to Excel. I have got it to create a HTML table successfully through a Codeigniter view but I want to know if there's any way I can re-use that view to create the Excel export, rather than doing it manually, as I'll then have to update it in two places every time I want to make a change to the report.
Any advice appreciated.
Thanks.
This seems to be working: