Excel attachment in e-mail

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Excel attachment in e-mail
# 8  
Old 11-08-2017
I noticed you are renaming a .csv to .xls file in your code and trying to send it as an attachment:-
Code:
mv tmp.csv tmp.xls

sendWithAttachment tmp.xls

But that is not gonna work, because XLS is a proprietary binary format.

So I would suggest sending the attachment as CSV. It is supported by excel and it will show each columns in respective cells.

Last edited by Yoda; 11-08-2017 at 12:29 PM..
This User Gave Thanks to Yoda For This Post:
# 9  
Old 11-08-2017
ok. But is there any other way to get the output in excel attachment.

will be grateful if you can provide some idea.

Thank you...
# 10  
Old 11-08-2017
If you have ssconvert you can use it to convert a CSV to XLS

or

Use Perl Spreadsheet module to convert a CSV to XLS
This User Gave Thanks to Yoda For This Post:
# 11  
Old 11-08-2017
Hi Yodha, As i had mentioned earlier. it should work only based on script not even SQL package should be used. No tools available in that environment and i dont have permissions to install as well.

Thanks.
# 12  
Old 11-08-2017
There are no options available in bash or ksh to convert a CSV to XLS.
This User Gave Thanks to Yoda For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Sending Excel Files as attachment using Mail

Hie, I need to attach an .xlsx file as an attachment to a mail. I have used the mail option but i dont think there is anything for attachment. Can you show me how else can i do it? I am not allowed to install mutt since it is a workplace and they have their restrictions. And its a Bash Shell (2 Replies)
Discussion started by: barryallen
2 Replies

2. Shell Programming and Scripting

Excel file attachment showing data in single column

Hi All, found similar posts, but not exatcly what i wanted. I have an text file like below and am trying to send mail as an excel file but when i get the excel file as the attachment, all the data is coming in the first column. I need below data in 4 columns. Unix file Name,ID,Trade,Date... (3 Replies)
Discussion started by: robinbannis
3 Replies

3. Shell Programming and Scripting

mailx not sending excel attachment properly

Hi, I am trying to send email with attachment using mailx command. I am using the folowing command: uuencode XX_HWSW_BUYERWISE_88963631_1.xls XX_HWSW_BUYERWISE_88963631_1.xls | mailx -s "Test Mail as Attachment" oracleams@xyz.com I get the email in the inbox. However, when I try to open the... (5 Replies)
Discussion started by: asp_julius
5 Replies

4. Shell Programming and Scripting

MIME - HTML mail with Excel attachment - Please help!

#!/bin/ksh ( echo "MIME-Version: 1.0" echo "Content-Type: multipart/mixed; boundary=frontier" echo "--frontier" echo "Content-Type: text/html" echo "Content-Disposition: inline" echo "\n" echo "<html><body><h1>this is html formatted text</h1></body></html>" echo "--frontier" echo... (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. Shell Programming and Scripting

Mail attachment with unix mail

Hi Could someone help me with the details on how to send an attachment through mail in unix. I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps. Regards Ajay (2 Replies)
Discussion started by: ajaykumarboyana
2 Replies

7. UNIX for Dummies Questions & Answers

Excel attachment in e-mail

Hi, I have to send the query output as an excel attachmet from UNIX Shell script, for this i have written following shell script and sql file this shell script has created the ho.xls file with correct query output but it doesn't generate the mail that shold contain query output as an excel... (5 Replies)
Discussion started by: karthikeyanjo
5 Replies

8. UNIX for Advanced & Expert Users

mailx commannd - Mail and Attachment in same mail

Hi , I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Discussion started by: sharif
6 Replies

9. Shell Programming and Scripting

Send email with attachment in form of excel in unix

Hi, I have a shell script which send email with an attachment in the form of an email. However, the when I open the attachment, all the data comes in one column. How do I format the data in the excel sheet while sending the email? Thanks (8 Replies)
Discussion started by: bdebroy
8 Replies

10. UNIX for Dummies Questions & Answers

mail attachment

This question has been asked many time before. I did search other questions. But was not able to work out. Really sorry for repeating the same question. I have mail and mailx and sendmail installed. It Tried this uuencode FILENAME.txt FILENAME.txt | mail mymail@yahoo.com the attachment... (3 Replies)
Discussion started by: sushrut
3 Replies
Login or Register to Ask a Question