PHP export to Excel file gives me source code in columns

FireGuy

New Member
I feel like I'm making a simple mistake but I can't seem to figure out what. I have some code for exporting a mySQL table to an Excel file. However, when I do the export, the entire HTML source code gets exported along with my data. I open the file in Excel and my table data in there but it's also got all the HTML inside. What could be causing all the source code to be exported along with the data? I should mention that I'm using this code as part of a Wordpress plugin I'm writing. When I test the export outside wordpress, it works fine. But when I try to export from a Wordpress admin page, I get all the extra HTML source code.
 
Back
Top