How to get values from an excel in a shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to get values from an excel in a shell script
# 1  
Old 12-22-2008
Bug How to get values from an excel in a shell script

Hi All,

Am trying to write a shell script which will get values from an excel and do some calculations.

Can any one pls help me out in the commands used to get the values from ms-excel.

Thanks!!!Smilie
# 2  
Old 12-22-2008
Hammer & Screwdriver Two ways to apprach this come to mind

First, there are some "involved" add-on modules that allow you to read/write Excel files. Search this forum and elsewhere for more info on them.

Second, and the option I utilize frequently, is .csv files - Excel can read/write csv files. They are comma separated values files. An example:
Code:
year,month,sales,revenue,salesman
2008,9,100000,5700,Joe
2008,10,92700,6300,Joe
2008,9,89500,5500,Steve
2008,10,91050,5600,Steve

You could then use awk or grep, each with a delimiter of "," to read and process the five fields.

So, the question as a follow-up ---- can the Excel file be saved as a csv file?
# 3  
Old 12-23-2008
Thanks joeyg!

since i am new to shell scripting, i dont have any clue on this. can you please name any such add-on modules?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Query the table and return values to shell script and search result values from another files.

Hi, I need a shell script, which would search the result values from another files. 1)execute " select column1 from table_name" query on the table. 2)Based on the result, need to be grep from .wft files. could please explain about this.Below is the way i am using. #!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

2. Shell Programming and Scripting

Excel from shell script

Is it possible to generate excel sheet from a shell script and rename the worksheet..? Thanks for your answer (1 Reply)
Discussion started by: Anu_1
1 Replies

3. Shell Programming and Scripting

Formatting Shell script output to Excel

I am facing a problem formatting the output of my shell script in excel. We are directing the output of the script to an excel sheet and need long integer type data printed in Excel as it is (i.e. not in the default scientific notation). Also, leading zeroes(if any) in the output are getting... (4 Replies)
Discussion started by: bornali.p
4 Replies

4. UNIX for Dummies Questions & Answers

Read excel file using shell script

Is it possible to read an excel sheet using shell script ? (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

5. Shell Programming and Scripting

Zip an excel in a shell script

I am getting an xls file in the dir errorpath. I would like to zip it. Kindly help me on this. The code is as below. sqllst=$errorpath/$run_pgm.${date_stamp}".xls" sqlstatus=$errorpath/$run_pgm"."${date_stamp}".sqlstatus" sqlscript=$binpath"/im_rpt.sql" (2 Replies)
Discussion started by: Nithin
2 Replies

6. UNIX for Dummies Questions & Answers

How to take input from excel for shell script.

i have both linux and windos installed on my pc . i want to take 1st column of excel as in input for my shell script .can anyone tell me how can i achive that. (1 Reply)
Discussion started by: nitin_aaa27
1 Replies

7. Shell Programming and Scripting

editing excel file through shell script

Hi, I am having a business file in excel having charts based on data already present on it. I would like to add new rows after the existing data and refesh the chart on it using shell script. For example-- In excel file in "sheet1", There is some data in first 10 rows ( from column A to F).... (0 Replies)
Discussion started by: sanjay1979
0 Replies

8. Shell Programming and Scripting

Export to Microsoft excel using shell script

I have requirement where i have to export the data extracted from a flat file to a microsoft excel sheet. If the awk returns multiple records then all these records should go in into different rows of same column in excel. Eg. say data returned by excel is A,B,C,D then these 4 records should go... (1 Reply)
Discussion started by: goutam_igate
1 Replies

9. Shell Programming and Scripting

Shell script to turn on Autofilter in Excel.

Hi, I have a shellscript that produces a csv that can be opened in Microsoft Excel. It has two columns and about 10 rows in each column, so only twenty cells (at the moment). When the user opened the csv, I wanted it so autofilter was already turned on in columns A1 and B1 (and potentially C1,... (1 Reply)
Discussion started by: rainemaida
1 Replies

10. Shell Programming and Scripting

reading data from excel using shell script

Hi all I am new to shell scripting. I need to write a shell script that reads each row of an USER_ID colume in a excel file. the excel has around 10000 rows of data. Can someone gives me some example or advice what's best way to do this thanks (11 Replies)
Discussion started by: tiger99
11 Replies
Login or Register to Ask a Question