Some of your code looks like it has unicode characters in the ide. (\ue003) so you will have to fix the code manually. As for office interop I would avoid it. The computer you are running the app does not have same version of office it might not work properly. I would recommend using something like openxmlsdk or npoi instead. They allow you to create excel files without needing excel installed
https://github.com/nissl-lab/npoi/wiki/Getting-Started-with-NPOI
https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
@eliiii , is any update?