Sponsored Content
Top Forums Shell Programming and Scripting mail a csv file as an excel sheet! Post 302510791 by dips_ag on Tuesday 5th of April 2011 03:06:57 AM
Old 04-05-2011
mail a csv file as an excel sheet!

Hi,

The result of a script is a csv file in the following format:
Code:
cat $file_name
DATA_USAGE_FACT,YES_NO_FLG,TARGET_TABLE,YES_NO_FLG,1,0,15,0
DATA_USAGE_FACT,DATE_OF_CREATION,TARGET_TABLE,DATE_OF_CREATION,29,9,19,0
DATA_USAGE_FACT,UPDATION_DATE,TARGET_TABLE,UPDATION_DATE,29,9,19,0
DATA_USAGE_FACT,INSTALLATION_DATE,TARGET_TABLE,INSTALLATION_DATE,29,9,19,0
DATA_USAGE_FACT,ASSET_CODE,TARGET_TABLE,ASSET_CODE,15,0,3,0

which I want to send in an excel sheet. What I'm doing is
Code:
 
unix2dos $file_name | uuencode $file_name $file_name.xls | mailx -s "Usage Sheet" <mail_id>

And though I get the above .xls sheet as an attachment in the mail; still the data inside it is in csv format only. It doesn't come in separate cells as intended.
I even tried
Code:
 
unix2dos $file_name > $file_name_dos
uuencode $file_name_dos $file_name_dos.xls | mailx -s "Usage Sheet" <mail_id>

but to no avail.

I've searched the forum and came accross a reverse requirement
https://www.unix.com/unix-dummies-que...lete-cell.html
there the csv data was actually coming in separate cells!!Smilie

Please advice.

-dips
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Insert csv into special sheet of excel

Hi, I need a script that can insert csv file into the special sheet of excel (other sheets in this excel include charts which use data of the special sheet). Could you help me please? (2 Replies)
Discussion started by: Elena
2 Replies

2. 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

3. UNIX for Dummies Questions & Answers

How to store the flat file in an excel sheet

Hi, I need to automate a script. The process in the script is as follows Running the script abc.ksh The report is stored in xyz (flat file) Need to store the flat file content in an excel sheet. Your reply is highly appreciated. Thanks, Karthick (2 Replies)
Discussion started by: karthickrn
2 Replies

4. Red Hat

HOWTO transfer Hosts in excel sheet to file in LINUX?

Hi guys! I have around 300 hostsname is excelsheet in one column. These hosts I want to add in one file in linux one after the another like hostname1,hostname2.hostname3, I don't want to waste enter it manually it very time consuming, so how to transfer these files from excelsheet to a... (1 Reply)
Discussion started by: manalisharmabe
1 Replies

5. Shell Programming and Scripting

a shell script to generate an excel sheet from a text file..

hi, i have a text file that looks like this! i want to generate an excel sheet out of it, removing all the junk data except the addresses that look like . Arrow Electrical Services Rotating Machinery, Electrical Contracting & Mining Specialists Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies

6. Shell Programming and Scripting

Copy Data from CSV file to Excel Sheet using Perl

Hi All, Firstly I will like to wish A Happy New Year to all. Now my issue is I have one csv file say(data.csv) and one excel file say(result.xls) The result.xls contains two sheet name Sheet1 and Sheet2, Now What I am trying to do is to First I want to delete that data of Sheet2 if present any,... (6 Replies)
Discussion started by: adisky123
6 Replies

7. Shell Programming and Scripting

Perl : to get all the hyperlinks from the xlsx sheet(hyperlinks not visible in excel sheet directly)

Hi folks, I have a requirement in perl to print all the hyperlink from the spreadsheet(xlsx). Spreadsheet contains few lines of hyperlink data (pic attached). P.S. Hyperlink is behind the data and not visible in excel sheet directly. Now using perl script I need to copy the hyperlinks in... (3 Replies)
Discussion started by: scriptscript
3 Replies

8. Shell Programming and Scripting

Shell Script for copying text file to Excel Sheet

Hi, I want to write a program to copy a log file to Excel sheet. Excel sheet has four columns MethodName , Code , Description, Details and Time. I want to pick these info from text file and put it in excel sheet. here is how the text file looks - 04.17.2014 08:06:12,697... (1 Reply)
Discussion started by: hershey
1 Replies

9. Shell Programming and Scripting

Summing up the data from different excel sheet into one excel sheet

Hi Folks, Can you please advise for any script in unix such that for example , i have 3 different excel sheet at the location /ppt/gfr/exc so the name s of the excel sheet are 1excel.xslx 2excel.xslx 3excel.xslx now in these 3 different excel sheet there is lot of data for example each... (3 Replies)
Discussion started by: punpun66
3 Replies

10. Shell Programming and Scripting

Need to convert text file into Excel sheet

:cool:Hi, Iam new to this Scripts and forum too. Plz excuse if may i ask silly questions now and further.. Prob: i need to convert txt files data into excel sheet. Suppose if i have hour-wise data in txt file1 and file2 like file1 file2 00: 140 00: 235 01: 160 01:415... (1 Reply)
Discussion started by: mrudula
1 Replies
IRSEND(1)							   User Commands							 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.9.0-pre1 October 2010 IRSEND(1)
All times are GMT -4. The time now is 09:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy