摘要:public List<string> ExcelVsion() { List<string> list=new List<string>(); List<string> lisemp = new List<string>(); List<string> listvison = new List<string>(); RegistryKey rk = Registry.LocalMachine; RegistryKey akey = rk.OpenSubKey(@"SOFTWARE\\Microsof
阅读全文
摘要:public System.Data.DataTable dsmdata()//查看 { public static string strCon = " Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source =d:\\csd.xls;Extended Properties=Excel 8.0"; OleDbConnection conn = new OleDbConnection(strCon); string sql = "select * from [Sheet1$]"; conn.Open(); OleD
阅读全文
摘要:public DataTable ReadCSV(string pathcsv,string FileName) { OleDbConnection OleCon = new OleDbConnection(); OleDbCommand OleCmd = new OleDbCommand(); OleDbDataAdapter OleDa = new OleDbDataAdapter(); DataSet dsCsvData = new DataSet(); OleCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Da
阅读全文