拷贝个2003的 excel.exe ,然后引用下

解决方案 »

  1.   

    你应该没添加引用,要添加引用DLL后,在.cs里才可以using引用的,在你项目下引用--添加引用--找到Microsoft.Office.Interop.Excel,应该在COM下吧
      

  2.   

    添加引用,com里选 microsoft excel 11.0 object libary如果没有,装一个office2003
      

  3.   

    这个问题我刚解决,我是参照http://www.saascn.net/bbs/redirect.php?fid=13&tid=226&goto=nextnewset
      

  4.   

    先添加引用,然后照如下代码using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.OracleClient;
    using Excel = Microsoft.Office.Interop.Excel;就ok了(注意这里把其他的引用页a粘出来是为了告诉你位置)
      

  5.   

    还请各位注意一下我的版本,不是office 2003,也不是vs2005,问题没有解决大家继续
      

  6.   

    高手注意一下是不是我的声明的位置有问题?在公司临时试了一下,还是不行
    在文件form1.Designer.cs中有如下声明:  
      private Excel.Application ExcelObj = null;  
      

  7.   

    楼主要这样啊:using Excel = Microsoft.Office.Interop.Excel;
    你这样using Microsoft.Office.Interop.Excel;不行的。
      

  8.   

    Interop.Microsoft.Office.Core.dll
    Interop.Office.dll
    Interop.Excel.dll
    ......
    要添加这几个参考,然后
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using Excel = Microsoft.Office.Interop.Excel;