I highly recommend this library for creating Excel files.
https://www.kellermansoftware.com/p-52-excel-reports.aspx
https://www.kellermansoftware.com/p-52-excel-reports.aspx