Question: how to export html table data to excel sheet using php?
Answer: If all you want is a simple excel worksheet try this: header('Content-type: application/excel'); $filename = 'filename. xls'; header('Content-Disposition: attachment; filename='. $filename); $data = '<html xmlns:x="urn:schemas-microsoft-com:office:excel"> <head> <!