I know I'm not answering your question here.
I'd be mindfull about copying and pasting data from SQL to Excel because of locales; how does Excel know what format your date is in e.g. is 1/2/2021 the 1/feb or 2/Jan. I suppose you could get TSQL to format as 1 jan 2021 for the Eng speaking world.
In my experience Excel doesn't like YYYYMMDD
To avoid this I get Excel to execute the Query via ODBC rather than pasting. This way formats are ok. Quickly found this via Google
Probably better examples on the web.
I normally find I have to connect via the Excel wizard to a SQL table just to create the connection- small table so its quick.
Once this is done I edit Excel's connection properties and replace with TSQL or a Stored proc call e.g.
EXEC sp_myStoredProc @p='Customer'
I save the workbook. Anyone using this workbook can format as they desire/move columns around and it keeps the format between data refreshes.
I believe it does this by sticking data into an Excel table on the sheet and you can use Excel table references to get to cells via their column names. Although I don't use Excel that much.