Connection to sqlserver from excel failed

Avyayah 1,291 Reputation points
2021-08-26T22:43:06.027+00:00

Unable to connect 126890-excelerror.jpg

Cannot get around this issue

SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Ronen Ariely 15,206 Reputation points
    2021-08-27T01:09:08.857+00:00

    Good day,

    Either a required impersonation level was not provided, or the provided impersonation level is invalid.

    Are you using power app / power BI ?

    (1) Try to connect to SQL Server using SQL authentication credentials (you might need to configure the SQL Server to enable SQL Server authentication).

    (2) run Power BI as administrator

    0 comments No comments

  2. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-08-27T02:41:30.95+00:00

    Hi @Avyayah

    > Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'

    How did you connect to SQL DB in your Excel? If you want to import SQL DB tables to Excel, suggest you connecting SQL DB from Data Connection Wizard Dialog as I mentioned in your previous thread. Then connect to SQL DB by windows authentication or SQL authentication .
    126917-screenshot-2021-08-27-103233.jpg

    If it is still not work, try below suggestion.

    1. Run the Excel as administrator
    2. Please try to reinstall or repair .NET Framework and then test again.
    3. Check the folder: C:\Windows\Microsoft.NET\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a, if it is empty, copy these two dlls: System.EnterpriseServices.dll/ System.EnterpriseServices.Wrapper.dll into this folder. If not, register those dlls again

    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.