Solved

Multiple CSV file into one excel file using shell script

Posted on 2011-09-07
5
3,490 Views
Last Modified: 2012-05-12
Hello Experts,

I have a folder in UNIX envirnment where I have multiple CSV files with one sheet each.
Now I want to put all the CSV files sheets into one excel file.

Can we do this in some shell script ?

Please help..
0
Comment
Question by:Swadhin Ray
5 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 36496219
cat *.csv > combined.csv

Do all have column headings?
0
 
LVL 16

Author Comment

by:Swadhin Ray
ID: 36496988
The columns heading can be different ..
So need to put each sheet of the each CSV file in to one excel file.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 36497694
1.  CSV files with one sheet each.
2.  put each sheet of the each CSV file in to one excel file.

Based on your requirement, there is no need to covert each csv into excel file.
MS Excel can open csv file directly.
0
 
LVL 77

Expert Comment

by:arnold
ID: 36498206
If you simply want to have them all concatenated into a single file, there is no need for a shell script.  The directive I posted will do it for all files in the directory that have the .cvs suffix will be combined into the single file which you then can load into excel..
0
 
LVL 2

Accepted Solution

by:
Ringthane earned 500 total points
ID: 36501133
I assume you need an XLS outputfile. If so: write a Perl program using perl functions to read and split the CSV lines and John MacNamara's excelent WriteExcel CPAN lib to create the Excel file.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole and browser performance 1 62
Python Assistance 7 71
Codiing Non-Existent Links 4 65
linux installs 6 47
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

930 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

11 Experts available now in Live!

Get 1:1 Help Now