I’m getting the same error. How did you resolve it exactly?
Details
UiPath Database Activities version: 1.9.0
Studio version: 2022.10.7
Dim connectionString As String = String.Format("
Provider=Microsoft.ACE.OLEDB.12.0;
Data Source={0};
Extended Properties='Excel 12.0;HDR=YES;IMEX=1;'", filePathXlsbFile)
The type initializer for 'System.Data.OleDb.OleDbConnection' threw an exception.
System.TypeInitializationException: The type initializer for 'System.Data.OleDb.OleDbConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.OleDb.OleDbConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.ProviderBase.DbConnectionPoolCountersNoCounters' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.PerformanceCounter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp)
at System.Data.ProviderBase.DbConnectionPoolCounters..ctor()
at System.Data.ProviderBase.DbConnectionPoolCountersNoCounters..ctor()
at System.Data.ProviderBase.DbConnectionPoolCountersNoCounters..cctor()
--- End of inner exception stack trace ---
at System.Data.ProviderBase.DbConnectionFactory..ctor()
at System.Data.OleDb.OleDbConnectionFactory..ctor()
at System.Data.OleDb.OleDbConnectionFactory..cctor()
--- End of inner exception stack trace ---
at System.Data.OleDb.OleDbConnection..cctor()
--- End of inner exception stack trace ---
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)