Hi,
What is it that your trying to explore. Check the wiki link below:
http://wiki.sdn.sap.com/wiki/display/Snippets/Formatted+Excel+as+Email+Attachment
Also what is the data that you convert to .xls is it csv and you are giving extension as .xls ?
Cheers,
Arindam