编译器错误信息: CS0234: 命名空间“Microsoft.Office”中不存在类型或命名空间名称“Interop”(是缺少程序集引用吗?)源错误: 行 10: using System.Reflection; // For Missing.Value and BindingFlags
行 11: //using System.Runtime.InteropServices; // For COMException
行 12: using Microsoft.Office.Interop.Excel;
行 13: 
行 14: /// <summary
 

解决方案 »

  1.   

    右键解决方案-》添加引用-》microsoft.office
      

  2.   

    你添加引用了吗?         
      using   System.Reflection;   
      using   System.Runtime.InteropServices;     
      using   Excel;   
      添加引用EXCEL应该好用的!
      

  3.   

    已经引用了Microsoft Excel 11.0 object Library可是还不好使阿
      

  4.   

    如果你的程序中只用到了Excel,那么你只要在引入Microsoft Excel 11.0 Object Library
    后在页面using Excel即可。
      

  5.   

    右击工程 - 添加引 - 在COM标签中选择Microsoft.Excel 11.0 Object Library - 确定。using System;
    using System.Reflection;
    using Excel = Microsoft.Office.Interop.Excel;
      

  6.   

    我的makeexcel.aspx.cs的代码是这样:
     protected void btnNormal_Click(object sender, EventArgs e)
        {        //创建一个Excel文件        Excel.Application myExcel = new Excel.Application();        myExcel.Application.Workbooks.Add(true);        //让Excel文件可见        myExcel.Visible = true;        //第一行为报表名称        myExcel.Cells[1, 4] = "普通报表";        //逐行写入数据,        for (int i = 0; i < 11; i++)
            {
                for (int j = 0; j < 7; j++)
                {
                    //以单引号开头,表示该单元格为纯文本
                    myExcel.Cells[2 + i, 1 + j] = "'" + myData[i, j];
                }
            }
        }
    可是这只在服务器端生成打开了excel,我要求在客户端能够打开并下载 ,怎么弄啊?