@Srikanth
Whether you open excel file stored in the SharePoint Online through excel client application or excel online?
For the first issue, please make sure file is published, approved and checked in.
For the second issue, please according to following tips to narrow down the issue.
1.Whether this error occurs when file is not stored in the SharePoint Online?
2.How do insert these links? Through Insert links or Power Query?
3.Add these links into Trusted Locations then have test.
Reference:
https://learn.microsoft.com/en-US/office/troubleshoot/excel/control-startup-message
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.