Home > Net >  For help! The excel data import datagridview data before and after the change, how to do?
For help! The excel data import datagridview data before and after the change, how to do?

Time:09-24



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 high

CodePudding user response:

Excel spreadsheet cell attribute is set to text

CodePudding user response:

refer to the second floor of autumn red fruit response:
excel spreadsheet cell attribute is set to text

Thank you, set up, have no effect
  •  Tags:  
  • C#
  • Related