There was several way to write XLS file, here I have given below one of the simple to way.
Steps:
1) Write all data set value into flat file (comma separated value) format.
2) With the help of com component ("Microsoft excel library") open the flat file and save as excel format.
Write into flat File: