c# 获取excel所有工作表

var filePath="f:\xx.xlsx"

string connStr = "Provider=Microsoft.Ace.OleDb.12.0;" + "data source=" + filePath + ";Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";

OleDbConnection myConn = new OleDbConnection(connStr);

myConn.Open();

DataTable table = myConn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);

var tableName = table.Rows[0]["Table_Name"].ToString();

上一篇:java scoket http TCP udp


下一篇:pandas分组group