Solved

How to combine 2 excels into one, and include header from only first one

Posted on 2014-11-19
7
90 Views
Last Modified: 2014-12-26
Hi,

How do we combine 2 excels into one, and include header from only first one.
Is there a any easy way to script it via a bat file.

Thanks!
0
Comment
Question by:chetan1981
  • 3
  • 2
7 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 40453904
Do you really mean XLS(x), or rather CSV?
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40453910
The former requires Office Automation, and that only works with .NET(like) languages (VB, VB Script, PowerShell), The latter is feasible in a .cmd batch, unless there are special characters like ampersand, parens, percent signs, double quotes, in short - very delicate.
0
 

Author Comment

by:chetan1981
ID: 40455025
CSV should be fine too..thanks
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 40455133
copy /A firstFile.csv combinedFile.csv
more +1 <secondFile.csv >>combinedFile.csv

Open in new window

0
 

Author Comment

by:chetan1981
ID: 40455332
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

808 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