After an initial test, I got the error message in MS Excel 2007 when opening the final output XLS file into it. I used your sample code with your template file. I have logged a ticket with an id “CELLSNET-42010” for your issue. We will look into it to figure it out soon.
It is good to know that your issue is resolved with the latest version. If you encounter any other issue, please feel free to post on our forums, we will be glad to help you further.