Hi @Aithan Gimenez ,
Per my test, I could reproduce your issue. We will need to use Doc.aspx?sourcedoc={uid}
to dsiplay the excel. I would recommend you to genrate embed code by Excel spreadsheet. Please refer to the following steps
1.Upload the Excel spreadsheet to the SharePoint Online document library first.
2.Open the Excel file in the Web browser (Excel Online) >> Click on File >> Share >> Embed.
3.In the Embed window, choose the content from the Excel spreadsheet you want to show, such as a Table, Range of Cells, or full workbook. You can customize further by setting other preferences by setting the respective checkboxes on the embed page. Copy the embed code generated once done.
And the generated code also use the format like your second url
Refer to this Microsoft Documentation for further help in setting parameters to the HTML iframe code.
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.