Sending/append result from CSH script to xls file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sending/append result from CSH script to xls file
# 1  
Old 02-06-2009
Sending/append result from CSH script to xls file

Hi,

1st post...

Done a quick search for this so apologies if I've missed it.

Basically I want to output and and append several values generated by a csh script direct to an xls openoffice file, rather than send to txt file and then physically copy and paste to xls file.

Already I send to txt file and open txt file & xls file using:

echo "BLUE" >> $resfile
te $resfile &
soffice -calc file_name &

where resfile is the path to text file.

The csh script is designed to run daily/weekly, and the xls file will chart the changes in these values over time.

Any thoughts? Only using csh, as I'm a unix beginner!!

thanks
# 2  
Old 02-06-2009
not fer total sure.... but i don't believe it can be done that way...
don't know the soffice xls format...

however, some ideas spring to mind, so...

perl has a module called Spreadsheet::MakeExcel

I've used that to create spreadsheets for Microsoft Excel.
Perhaps there's a similar module.
You'll have to research that one yourself.
here's the link for that one though:

Spreadsheet::WriteExcel - Write to a cross-platform Excel binary file. - search.cpan.org
# 3  
Old 02-06-2009
another idea that makes a little more sense....

Excel can import data from a .CSV ( command-delimited flat file )
Why not use something like that?

Then the append is straightforward.
# 4  
Old 02-06-2009
thanks,

but was hoping for an 'all-in-one' solution to my techs could run the script and it would auto-input to openoffice calc (.xls) without them needing to type it.

would the csh > csv > xls solution be do-able in the script?

cheers
# 5  
Old 02-06-2009
i suppose:

csh >> csv

would work.

someone would still have to load it into soffice. Smilie

but generally, no, you can't append flat files onto application files without
a converter.

there might be something "out there" that does this....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append result in the same line

I have a line like below a,blank,12,24 I want to add (12+24) at the end of the line or any where in the same line line output: a,blank,12,24,36 (2 Replies)
Discussion started by: Anjan1
2 Replies

2. Shell Programming and Scripting

Perl script to convert xlsx to xls file

Hi I am trying one perl script to convert xlsx to xls file but could not able to get all the rows and columns in the xls file . This scriptFILE is basically to convert XLSX to CSV .. I am tweaking the script to convert XLSX to XLS file also #######################FILE... (3 Replies)
Discussion started by: kshitij
3 Replies

3. Shell Programming and Scripting

Script to take .xls file and read it for each server

Script to take .xls file and read it for each server "/aix/test/$server_pre.xls" and then removes all the disks as provided in the file and then give output as below for each server, but am getting error where it says cannot find directory. server_name: server1 Disk Cleaned hdisk1 hdisk1... (2 Replies)
Discussion started by: aix_admin_007
2 Replies

4. Shell Programming and Scripting

Different epoch conversion result for bash and csh users

Hi there I'm using this script to convert command line history with Epoch time stamp to human readable. While it works fine with users with /bin/csh shell, it fails to convert for users with /bin/bash shell. Why is this happening? I even changed and added * and after the # but it still didnt... (2 Replies)
Discussion started by: hedkandi
2 Replies

5. Shell Programming and Scripting

Append Text in Result File Name

Hi Below command is returning the list of files which having this string "MTL_SYSTEM_ITEMS". find . -name "*"|xargs grep -il MTL_SYSTEM_ITEMS Ex: Above command is returing 2 files (Out of 10 files 2 files having this string). ./file1.txt and ./file2.txt Here I want to append... (3 Replies)
Discussion started by: balajiora
3 Replies

6. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

7. Shell Programming and Scripting

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... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

8. Shell Programming and Scripting

csh script to search for files and display result

Hello all. I'm a long time browser, first time poster...Be gentle :-) I don't use csh much, but have been asked to make a small script for our HP-UX systems to search for a report file(s) or summary file and display the result (I was using vuepad, but this probably is just complicating... (4 Replies)
Discussion started by: neillsm
4 Replies

9. Shell Programming and Scripting

converting xls file to txt file and xls to csv

I need to convert an excel file into a text file and an excel file into a CSV file.. any code to do that is appreciated thanks (6 Replies)
Discussion started by: bandar007
6 Replies

10. Shell Programming and Scripting

How to extract output from a script to .xls file

Hi, I am running a script, the output of which is needed to be filled in .xls file. I am doing this manually now, i mean I am writing the output of the script to Excel file manually. How to redirect the output of the script to .xls file? Please help me out!!! Thanks much, Scriptlearner. (6 Replies)
Discussion started by: scriptlearner
6 Replies
Login or Register to Ask a Question