Search code examples
vbscriptasp-classicexport-to-excel

ASP/VBScript generated Excel file is blank


I have a bit of code that I've used many times to export an HTML table into an Excel file, and it works fine. But now I have a new report that I need to be able to export that works fine when viewed as an HTML page, but viewed in Excel the entire spreadsheet is blank - no grid, no data, nothing.

The above is the code I'm using, and there are no logic errors on the page that prevents it from being shown. Has anyone else had this issue, or knows how to solve it?

And before someone asks, yes. I've tried using CSS to show black text and borders, with no luck.


Solution

  • It could be that you are including HTML or BODY tags. Make sure you are only using TABLE, TR and TD tags, as I have had problems with using HTML and BODY tags in the past.