How to create xls file using unix script

Hi All,

I want to create an xls file using shell script. I mean that I have written one script. It is having sql output. So I want to save that sql output into one xls file and I want to send that file as a attachment to my team MAIL_IDs.

Can You any guy help me in this?

Thanks in Advance.

Regards,
Raghu.

I have tried same thing... but did not get the required output.

As a solution i have created a CVS file.....

Hi Amit,

I am also doing the same now. I am creating .csv output file.

But how to send this file to mail_id as an attachment. I tried the below command. But I am not getting the mail with attachment. I am getting the mail with some junk characters.

(uuencode attach.txt attach.txt ; echo "mail_body")|mailx -m -s "subject" ragu@gmail.com

Can anyone give me any idea in this?

Thanks in advance.

Regards,
Raghu.

You can use

uuencode attach.txt attach.txt.txt | mailx -s "Testing if Mailx" ragu@gamil.com