0

我使用以下代码在经典 asp 中创建了一个 excel 文件。

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = TRUE
objExcel.Workbooks.Add

Set objWorksheet = objExcel.Worksheets("Sheet2")
objWorksheet.Activate

objWorksheet.Cells(1, 1).Value = "A"

我有以下错误。

Microsoft Office Excel (0x800A03EC)
Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need. • To free disk space, delete files you no longer need from the disk you are saving to.

我该如何解决这个问题?谢谢。

4

1 回答 1

3

我建议您考虑将数据输出为一个大 HTML 表,并强制浏览器在您的回复开始时使用以下内容在 Excel 中打开它:

<%
response.ContentType = "application/vnd.ms-excel"
response.AppendHeader "content-disposition", " filename=export.xls"
%>
于 2012-10-09T12:57:02.973 回答