question

SahaSaha-5270 avatar image
0 Votes"
SahaSaha-5270 asked SahaSaha-5270 commented

Connection to sqlserver from excel failed

Unable to connect 126890-excelerror.jpg



Cannot get around this issue

sql-server-general
excelerror.jpg (34.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SahaSaha-5270,

We have not received a response from you. Did the reply(s) could help you? If the response helped, do "Accept Answer". If it is not work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered SahaSaha-5270 commented

Hi @SahaSaha-5270

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.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks you so much this resolved my issue.

0 Votes 0 ·
pituach avatar image
0 Votes"
pituach answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.