You are
not exporting the grid to Excel. You are "exporting" it to HTML, whilst lying to the browser to make it think your content is an Excel file.
Excel will do its best to import the HTML. But you will have extremely limited control over the formatting, and you will always get a warning message telling you that the file content doesn't match the expected file type.
If you want to export to Excel, then use a library to generate a real Excel file. For example,
ClosedXML[
^], or the
OpenXML SDK[
^].