Microsoft’s April 2024 Excel update hides Microsoft Query under Legacy options. This results in the error when you use Excel with Sage 50 Accounts.
To resolve this, you'll need to turn Microsoft Query back on: