对不起各位,我只有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里,然后让客户端下载打开它,但以上这段代码放到哪里都有上述问题,请各位赐教,感激不尽
在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里,然后让客户端下载打开它,但以上这段代码放到哪里都有上述问题,请各位赐教,感激不尽
2、也许是EXCEL版本的问题,不同版本的Open方法不同。EXCEL保存的问题,到“【孟宪会之精彩世界】之.NET开发者园地”就会有了(代码)
这第一行就错了沙,又是经自动完成害了的应该是
Excel.Application myexcel=new Excel.Application();