https://www.aspsnippets.com/Articles/Read-Excel-file-using-OLEDB-Data-Provider-in-C-Net.aspx
Regarding the above ....
I get error saying oledb12.0 is not registered in my local machine...
Also nowadays we have 16.0 ...
Which version of oledb provider do we use so that our code runs on all machines ols and new 4.0, 12.0, 15.0, 16.0???
// if the File extension is .XLSX using below connection string szConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; "Data Source='" + szFilePath + "';Extended Properties=\"Excel 12.0;HDR=YES;\"";
But in my code the connection string should be 12.0 ?? or the latest 16.0 ??? the provider
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.