Hi CP,
I was saving the report as an XL with Format,and then mailing the Excel file.
I finally could make it to work using a script,which I could write after looking at all the scripts that people earlier posted in this forum.Thanks to all of them,and specially to Dave,who has organized everything as nice FAQ's.