【发布时间】:2013-11-10 09:51:10
【问题描述】:
我在这里打开 excel 并写入 excel 表。我正在将我的 Windows 应用程序更改为 asp 网站并看到此错误。我已经添加了所有的引用和库。不知道我在这里缺少什么。
出现如下所述的错误。请帮帮我。
Excel.Application excel = new Excel.Application();
excel.Visible = false; // to hide the processing
Excel.Workbook wb = excel.Workbooks.Add();
Excel.Worksheet sh = wb.Sheets.Add(); // Error at wb
sh.Name = "Links";
for (int i = 1; i < list.Count; i++)
{
sh.Cells[i.ToString(), "A"].Value2 = list[i]; //Error at .Value2
}
【问题讨论】:
-
你缺少演员表吗?是的。从不,从不在网络服务器上运行 Excel。
标签: c# .net excel interop excel-interop