Workbooks.Add时,会出现以下错误:
Microsoft Office Excel 错误 '800a03ec'
内存或磁盘空间不足,Microsoft Office Excel 无法再次打开或保存任何文档。
? 要想获得更多的可用内存,请关闭不再使用的工作簿或程序。
? 要想释放磁盘空间,请删除相应磁盘上不需要的文件。
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.
[解决办法 Solution]
var xl = new ActiveXObject("Excel.Application");
//加上这句就不会出错了!
xl.DefaultSaveFormat = 56; //xlExcel8s
var oBook = xl.Workbooks.Add();