c# 操作EXCEL

 连接字符串:

     string   cs   =   "Provider=Microsoft.Jet.OLEDB.4.0;Data   Source=d://文件.xls;Excel   8.0;HDR=Yes;IMEX=1 ";

 

历遍Sheet,显示每个Sheet名: 
     DataTable   ttable   =   cn.GetSchema( "Tables ");

 

Excel查询语句: 
     string   ss   =   "select   *   from   [Sheet1$] "

你可能感兴趣的:(C#,c#,excel,string)