Getting error Connection String of Excel as Database

I am using Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=FilePath; as connection string. I am getting an error as [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. any help please.

hope this would help you

Cheers @Shashi123

@Shashi123

You can’t use Other excel format in Odbc connection you can only use .xls format only in ODBC connection

ODBC connection string

Driver={Microsoft Excel Driver (*.xls)};dbq=C:\Book1.xls;Readonly=0"

If you want to use other excel format you have to use OLEDB connection string but make sure before that you have to install MSAccess Engine

Oledb connection string

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myOldExcelFile.xlsx; Extended Properties='Excel 8.0;HDR=YES IMEX=-1’

Hi amaresan,

When i tried to connect a xls file it gave me this error. Any help please
19.9.2+Branch.master.Sha.0928919eb1def274fdabeb0849d03a125c50fe6a

Source: Connect

Message: ERROR [HY000] [Microsoft][ODBC Excel Driver] External table is not in the expected format.
ERROR [01000] [Microsoft][ODBC Excel Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0x3dc0 Thread 0x2344 DBC 0xba81f64 Excel’.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Excel Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0x3dc0 Thread 0x2344 DBC 0xba81f64 Excel’.
ERROR [HY000] [Microsoft][ODBC Excel Driver] External table is not in the expected format.

Exception Type: System.Data.Odbc.OdbcException

RemoteException wrapping System.Data.Odbc.OdbcException: ERROR [HY000] [Microsoft][ODBC Excel Driver] External table is not in the expected format.
ERROR [01000] [Microsoft][ODBC Excel Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0x3dc0 Thread 0x2344 DBC 0xba81f64 Excel’.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Excel Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0x3dc0 Thread 0x2344 DBC 0xba81f64 Excel’.
ERROR [HY000] [Microsoft][ODBC Excel Driver] External table is not in the expected format.

Server stack trace:
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle…ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen…ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at UiPath.Database.DatabaseConnection.OpenConnection()
at UiPath.Database.DatabaseConnection…ctor(String connectionString, String providerName)
at UiPath.Database.Activities.DatabaseConnect.<>c__DisplayClass12_0.b__0()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object args, Object server, Object& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Func`1.EndInvoke(IAsyncResult result)
at UiPath.Database.Activities.DatabaseConnect.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@Shashi123

can you share your code . we will check and let you know