String strCon="Provider=Microsoft. Jet. The oledb. 4.0; Data source="+ filePath +"; Extended properties=8.0 "excel;
OleDbConnection conn=new OleDbConnection (strCon);
String strSql="select * from [Sheet1 $]".
OleDbCommand CMD=new OleDbCommand (strSql, conn);
OleDbDataAdapter da=new OleDbDataAdapter (CMD);
Da. The Fill (ds, "Sheet1");
CodePudding user response:
It is best to use splicing code, code rather than tools, tools for system environment requirements are too highCodePudding user response:
Excel spreadsheet cell attribute is set to textCodePudding user response: