SOLVED

Microsoft.ACE.OLEDB.12.0 Issue

Copper Contributor

So I have a C# app that reads from Excel (using Microsoft.ACE.OLEDB.12.0) in order to then add those rows into a larger consolidated sheet. It's worked fine for a long time. Suddenly the past couple of weeks I received trouble reports from endusers that the app isn't functioning. When I debugged it, seems that the Excel source files have zero rows read. No runtime errors or anything.

 

I have verified that the column headings are correct, against the OleDbCommand.CommandText query. And the column headings are based on a generic template that all of these source sheets use. The source sheets have rows of valid data.

 

A year or two ago I recall there was a Windows Update that affected some of these Excel OLEDB operations. Due to MDAC era components being deprecated. Hence why I changed over to ACE OLEDB 12.0. Since I did that this app has run without fail.

 

Anyone know if there was indeed a Windows Update that would've affected things? Running this on Windows 10 Pro. I can provide my source code, although it's been unmodified and is relatively verbose.

1 Reply
best response confirmed by gregarican (Copper Contributor)
Solution
I just installed the ExcelDataReader Nuget package and all is well again. There was definitely a new wrinkle likely introduced with a recent Windows Update that affects the way that the OleDbDataReader interacts with Excel using the Microsoft.ACE.OLEDB.12.0 provider.
1 best response

Accepted Solutions
best response confirmed by gregarican (Copper Contributor)
Solution
I just installed the ExcelDataReader Nuget package and all is well again. There was definitely a new wrinkle likely introduced with a recent Windows Update that affects the way that the OleDbDataReader interacts with Excel using the Microsoft.ACE.OLEDB.12.0 provider.

View solution in original post