Hi,
I am not very familiar with the Excel API, however I found this example that demonstrates how to run a macro in Excel.
There are plenty of times that you can just send the data to Excel and run a macro to do all the formating for you.
I hope this helps.
Regards,
Juan Carlos
N.I.