Trying to send an excel spreadsheet.


 
Thread Tools Search this Thread
Operating Systems AIX Trying to send an excel spreadsheet.
# 1  
Old 05-14-2009
Trying to send an excel spreadsheet.

I may have posted in the wrong section, either way I need some help.

And I have to modify this part of the script, I'm not sure what to change the content-type to for this to work, or what else I would need to change here:

Code:
# This script sends Email  acoording to command line arguments.
# $1 - file to be attached (full path with name)
# $2 - file name as it shows on Email (can be any name)
# $3 - recipient list (separated by commas)
# $4,$5,$6,$7 - Subject (up to 4 words)

   echo "Subject: $4 $5 $6 $7"  > alerts
   echo "TO: $3" >> alerts
   echo "Content-type: multipart/mixed; \
boundary=\"Boundary_(ID_mO+hZOEtmqFT2u66ThY4xw)\"" >> alerts
echo "\nThis is a multi-part message in MIME format.\n" >> alerts
echo "--Boundary_(ID_mO+hZOEtmqFT2u66ThY4xw)" >> alerts
echo "Content-type: text/plain; charset-iso-8859-1" >> alerts
echo "Content-transfer-encoding: 7BIT\n" >> alerts
   date >> alerts
   echo "\nDO NOT REPLY TO THIS EMAIL" >> alerts
if [ "$1" = NO ] ; then
        :
else
echo "\n--Boundary_(ID_mO+hZOEtmqFT2u66ThY4xw)" >> alerts
echo "Content-type: text/plain; name=$2" >> alerts
echo "Content-transfer-encoding: 7BIT" >> alerts
echo "Content-disposition: attachment; filename=$2\n" >> alerts
cat $1 >> alerts
fi
echo "\n--Boundary_(ID_mO+hZOEtmqFT2u66ThY4xw)--" >> alerts

Please suggest what to change so I can mail the excel spreadsheet. Thanks again.
# 2  
Old 05-14-2009
Please do not double post - it's against the forums' rules.
Thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX - how to send attach excel in mail

Hi Experts, i need your help here :confused: Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell. Thanks in... (9 Replies)
Discussion started by: newbieabc
9 Replies

2. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

3. Programming

extract the same format from existing excel file using " Spreadsheet::ParseExcel " module

Hi , can any one tell me,"How to extract the same format from existing excel file to new excel file " using Spreadsheet::WriteExcel or Spreadsheet::ParseExcel module ??? Example_pgm: Below program is used to read existing excel file..In this program "my $cell = $_;" line is used to... (0 Replies)
Discussion started by: kavi.mogu
0 Replies

4. Shell Programming and Scripting

Trying to send an excel spreadsheet.

And I have to modify this part of the script, I'm not sure what to change the content-type to for this to work, or what else I would need to change here: # This script sends Email acoording to command line arguments. # $1 - file to be attached (full path with name) # $2 - file name as it... (1 Reply)
Discussion started by: NycUnxer
1 Replies

5. Shell Programming and Scripting

UNIX -> send data as excel in seperate cells

Hi I have a data file in UNIX as follows. I need to send this file in Mail as excel format. but the problem i face is i get the data all in single cells per row. what can i do to get the data in seperate cells. File -> attachment.xls data data data data data1 data1 ... (1 Reply)
Discussion started by: vj8436
1 Replies

6. Shell Programming and Scripting

How to convert the data into excel sheet and send mail using 'mailx' command

Hi all I have a shell script that uses a stored proc to generate output from some tables and send the same in an e-mail using mailx command. Now I need to convert the output to excel format and send e-mail. How can I achieve this. Please help me in this regard, as it's very urgent and I have been... (5 Replies)
Discussion started by: sanbabu
5 Replies

7. Shell Programming and Scripting

How to send a repost as a Excel file...?

Hi All, Have a file in solairs and want to send it as a Excel file...! Yes i getting it as .csv file...! but it's not looking gud.. how i can add colos into it..? Generate report in Excel, with color and it should look good..! (1 Reply)
Discussion started by: bullz26
1 Replies

8. UNIX for Dummies Questions & Answers

Download to unix/linux from excel spreadsheet

Hi all, I am not a computer programmer nor a computer specialist but I do create some Excel speadsheets and I need to download the data generated from Excel to a Unix/linux programmed screen. Do you know if there is a way or a "trick" that could make this data transfer automated so it would... (2 Replies)
Discussion started by: claude73
2 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

Is it possible to import a Unix directory into an Excel spreadsheet

Does anyone know if it's possible to import a Unix directory into an Excel spreadsheet? I'm trying to create a report based on about several thousand files within a Unix server directory, I was thinking if I could import the directory into a spreadsheet it would be easier to sort the data based... (2 Replies)
Discussion started by: Arkitech
2 Replies
Login or Register to Ask a Question