开发者

Issue while establishing connection with excel

开发者 https://www.devze.com 2023-01-13 01:21 出处:网络
The below connection string establishes connection with excel file which has extension as \'.xls\' but same string throws an exception while opening a connection with file which has extension as .xlsx

The below connection string establishes connection with excel file which has extension as '.xls' but same string throws an exception while opening a connection with file which has extension as .xlsx.

Any idea?

ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Users\abcd\Desktop\d开发者_C百科emo.xls; Extended Properties=excel 8.0; Persist Security Info=False


This is because you need a different connection string for xlsx'es.

0

精彩评论

暂无评论...
验证码 换一张
取 消