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

Posted on 2014-11-19
Last Modified: 2014-12-26

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.

Question by:chetan1981
  • 3
  • 2
LVL 68

Expert Comment

ID: 40453904
Do you really mean XLS(x), or rather CSV?
LVL 68

Expert Comment

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.

Author Comment

ID: 40455025
CSV should be fine too..thanks
LVL 68

Accepted Solution

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

Open in new window


Author Comment

ID: 40455332

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

707 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

17 Experts available now in Live!

Get 1:1 Help Now