ASP/VBScript 生成的 Excel 文件为空
我有一些代码,我已经多次使用它来将 HTML 表格导出到 Excel 文件中,并且效果很好。但现在我有一个新的报告,我需要能够导出该报告,当以 HTML 页面查看时,该报告工作正常,但在 Excel 中查看时,整个电子表格都是空白的 - 没有网格,没有数据,什么都没有。
以上是我正在使用的代码,页面上不存在阻止其显示的逻辑错误。有其他人遇到过这个问题,或者知道如何解决吗?
在有人问之前,是的。我尝试过使用 CSS 来显示黑色文本和边框,但没有成功。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能包含
HTML
或BODY
标记。确保您只使用TABLE
、TR
和TD
标记,因为我在使用HTML
和过去的BODY
标签。It could be that you are including
HTML
orBODY
tags. Make sure you are only usingTABLE
,TR
andTD
tags, as I have had problems with usingHTML
andBODY
tags in the past.