Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Excel sheet in .xls file. I want to merge it with a .csv file, so that the data in the .csv file will be added starting from the first empty row in .xls.

I want to be able to do it automatically.

share|improve this question
Flagged as possible duplicate of… – uSlackr May 17 '11 at 14:31
have you tried opening the csv in Excel , copying all the data and pasting it in the xls file ? – Shekhar May 17 '11 at 14:37
1. it's not a duplicate. the questions are related but different. 2. i want to be able to do it automatically, and not manually – Igor Oks May 17 '11 at 14:41
up vote 1 down vote accepted

You'll need to create a macro.

The basic steps of the macro will be: 1) Open the xls file and find the last row with data. Add 1 to this and you get the first row without data. 2) Open the csv file, find the last row of data, and select and copy all the data rows. 3) Paste the data from the csv file into the xls file beginning with the first row without data.

You can find the macro code for the individual steps of this process by Recording a macro for each of the different steps and then put the steps together to make it all work the way you need.

In importing the CSV you'll want to make sure you have set each column to it's appropriate data type, otherwise, pasting into the xls may cause data corruption issues.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.