如何将excel导入到数据库中并在gridview中显示

2024-12-05 15:49:11
推荐回答(1个)
回答1:

public void ImportExcel(string fileName ) { //string fileName = "d:\\123.xls"; string excelStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1'";//execl 2003 //stri...