在'Microsoft.ACE.OLEDB.12.0'供应商未在本地计算机上注册。
不能远程上传,只能本地上传,
string strConn;
        string query = "select * from [Sheet1$]";
        DataSet ds = new DataSet();
        if (fileException == ".xlsx")
        {
            strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filepath + ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1'";        }
        else
        {
            strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1'";
        }
        OleDbCommand oleCommand = new OleDbCommand(query, new OleDbConnection(strConn));
        OleDbDataAdapter oada = new OleDbDataAdapter(oleCommand);
        oada.Fill(ds);
        return ds.Tables[0];
 跪求 知道的人帮忙下