关于使用excel.application的奇怪问题
对不起各位,我只有10分了,请各位不要嫌弃。
在page_load里,我写的代码如下:
Excel.Application myexcel=new Excel.ApplicationClass();
object temp=Missing.Value;
myexcel.Workbooks.Open(“..\\..\\myexcel.xls”,temp,temp,temp,temp,temp,temp,temp,temp,temp,temp,temp,temp);
myexcel.Cells[1,4]="aaa";
myexcel.Visible=true;
myexcel.Workbooks.Close()
但打开网页时总是打开到一般就停住了,一片空白,不知道哪里有问题了。
我就是想把查询的结果写进excel里,然后让客户端下载打开它,但以上这段代码放到哪里都有上述问题,请各位赐教,感激不尽