My strategy has been to always avoid excel files like the plague and write CSV (or TSV) files (link) to work with programatically. Alas, that is not always an option. But if, in your case, it is: consider it!
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
There are Excel libs that can be imported to the program - these are standard stuff that are available in the internet and need not be posted in forums unless theres something to discuss CG does not create any languages or software - the MSDN is for that. CG allows one to brainstorm a problem after you've tried.