Solved

Reading data from excel using shell script

Posted on 2015-01-16
9
1,058 Views
Last Modified: 2015-03-29
I have an excel sheet which has 5 columns like name, age, sex, address,phone number. can any one please help me out in reading the excel sheet only using shell script instead of using Perl and python.

TIA
0
Comment
Question by:gaurav sharma
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 28

Assisted Solution

by:Jan Springer
Jan Springer earned 167 total points
ID: 40555207
You don't.  You use a tool like perl and modules.

You can use bash (or other shell) if you export that file to a csv/txt and remove the formatting.
0
 
LVL 18

Assisted Solution

by:Simon
Simon earned 166 total points
ID: 40555241
Slight update: It depends if you're referring to a true 'Excel file' ie. one of Excel's proprietary file formats. If you store it as csv or other delimited text format you can read it from bash.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40555243
Hint: It's not an excel file if it's in csv or txt format.
0
 
LVL 18

Expert Comment

by:Simon
ID: 40555275
@Jan, Yes, I know, but I've had a few people recently refer to "Excel sheets" (as opposed to Workbooks) when they are actually CSV files that show with an Excel icon on their desktop and open in Excel by default.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 21

Expert Comment

by:Mazdajai
ID: 40555277
Other expert already responded "you don't" ... And in fact - you can't.

There is no bash API to read excel natively. In fact, other languages don't by default - they rely on pre-build modules.
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 40555291
Understood.  I just don't think it's correct to perpetuate an inaccuracy.  A nit perhaps but felt that clarity was needed.
0
 

Author Comment

by:gaurav sharma
ID: 40681621
I've requested that this question be deleted for the following reason:

incorrect
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 167 total points
ID: 40681622
What is incorrect?
0
 

Author Comment

by:gaurav sharma
ID: 40685892
Incorrect question
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now