문제

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\demo.xls; Extended Properties=excel 8.0; Persist Security Info=False

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top