I suggest you run Excel in safe mode for a test.
You can hold on Ctrl key, click or double-click Excel icon, until Excel asks do you want to start it in safe mode, then please release Ctrl key and click "Yes".
Then open this Excel file to click 'Refresh All', check whether you may sign into SharePoint.
- If this issue deos not occur with safe mode, please go to
File > Options > Add-ins > Manage COM Add-ins, click Go, clear the check boxes for any enabled COM add-ins, select OK. Then you may restart Excel. - If safe mode does not work, I sugges you go to Get Data tab > Data Source Settings > Global permissions > Clear permissions. Then refresh the query and you will be asked to enter your credentials again.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.