求教:c#开发WEB应用程序,EXCEL文件显示不出来? 你想在哪显示呀,这些脚本是在服务器段运行的,要想在客户端显示的话,就要保存,然后让浏览器转到这个xsl文件 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 想在客户端显示、打印出来,请教XD如何让浏览器转到这个xsl文件? 修改了程序,可以在服务器保存,但如何实现在客户端显示、打印呢?另外程序执行后进程杀不掉,我是新手,请各位多多帮助,谢谢 Excel.Application oXL; Excel._Workbook oWB; Excel._Worksheet oSheet; Excel.Range oRng; //Start Excel and get Application object. oXL = new Excel.Application(); oXL.Visible = false; //Get a new workbook. oWB = (Excel._Workbook)(oXL.Workbooks.Add( Missing.Value )); oSheet = (Excel._Worksheet)oWB.ActiveSheet; //Add table headers going cell by cell. oSheet.Cells[1, 1] = "First Name"; oSheet.Cells[1, 2] = "Last Name"; oSheet.Cells[1, 3] = "Full Name"; oSheet.Cells[1, 4] = "Salary"; oWB.SaveAs(@"C:\Inetpub\wwwroot\WebApplicationIntro\test1.xls",Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing,Type.Missing, Type.Missing, Type.Missing); oSheet.PrintPreview(Type.Missing); oWB.Close(false,Type.Missing,Type.Missing); oXL.Quit(); WPF Calendar 控件的焦点转移问题. WPF 选中Item如何不让其选中Item中的控件(背景色不变即可) 如何在一个定时器程序里面控制外面的一个线程? AD中如何迁移OU用户到另一个OU里? 奇怪的错误!!!!!是在是不明白! .net winform里声明的public属性外部为何无法访问? excel公式调用 VS.Net间歇性占用100%Cpu问题 数据绑定,数据字段后自动加个输入框填值保存 我怎么在xml的属性中使用& 急寻大侠给解决---如何在页面中调用代码页面的函数,其中包含在javascript中调用C#函数? 带有界面的Web自定义控件的建立问题(500分)
Excel.Application oXL;
Excel._Workbook oWB;
Excel._Worksheet oSheet;
Excel.Range oRng; //Start Excel and get Application object.
oXL = new Excel.Application();
oXL.Visible = false; //Get a new workbook.
oWB = (Excel._Workbook)(oXL.Workbooks.Add( Missing.Value ));
oSheet = (Excel._Worksheet)oWB.ActiveSheet; //Add table headers going cell by cell.
oSheet.Cells[1, 1] = "First Name";
oSheet.Cells[1, 2] = "Last Name";
oSheet.Cells[1, 3] = "Full Name";
oSheet.Cells[1, 4] = "Salary";
oWB.SaveAs(@"C:\Inetpub\wwwroot\WebApplicationIntro\test1.xls",Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing,Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing,Type.Missing, Type.Missing, Type.Missing);
oSheet.PrintPreview(Type.Missing);
oWB.Close(false,Type.Missing,Type.Missing);
oXL.Quit();