Anyone finding this in 2024 and having issues with the accepted answer because of "provider not found on local machine" just update the connection string by changing Microsoft.Jet.OLEDB.4.0 to Microsoft.ACE.OLEDB.12.0. Works like a charm.
Apparently this has to do with 32-bit vs 64-bit.