'Error: 3706 Provider cannot be found. It may not be properly installed

I recently upgraded to Office 2019 from Office 2007 and I am facing issue with the connection string.

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strExcelPath & ";Extended Properties=""Excel 12.0 Xml;HDR=Yes;"";"   

This used to work before and now I am getting "Error: 3706 . Provider cannot be found. It may not be properly installed" Can someone help me in understanding why I am getting this error.

Other than excel upgrade, nothing else is changed.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source