来源: http://www.notetoday.cn/opennote/View?noteId=50
oledbconn1.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;data source="+openFileDialog1.FileName+";Extended Properties=Excel 8.0;Persist Security Info=False";
oledbconn1.Open();
DataTable dt = oledbconn1.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,new objec] {null, null, null, "TABLE"});
If(dt !=null && dt.Rows >0)
{
DataRow[] dr = dt.Select("TABLE_NAME = '"+sheet名+"'");
if(dr == null || dr.Lenght = 0)
{
不包含
}
}