怎么读取excel文件中的所有sheet名称?
DataSet ds = new DataSet();
OleDbDataAdapter ad;
string strDbPath = strExcelFilePath;
string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strExcelFilePath + ";Extended Properties=Excel 8.0;";
OleDbConnection Conn = new OleDbConnection(strConn);
Conn.Open();
string strSQL = "SELECT * FROM [sheet1$]";
ad = new OleDbDataAdapter(strSQL, Conn);
ad.Fill(ds);
Conn.Close();
Conn.Dispose();
return ds;
这是我读取“sheet1”时用的,如何得到当前excel文件中的所有sheet?