The quick HTML table to Excel trick is somewhat hacky and inconsistent across browsers, especially Chrome.
Also, Excel might complain about the file format since the content is HTML but the extension is .xls.
For a more robust solution, consider libraries like SheetJS (xlsx) which can convert tables or JSON data to real Excel files programmatically.
It’s a bit more setup but gives you full control and cross-browser compatibility without relying on browser quirks.