Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: import csv, retain headers Stata11.2

From   Tim Evans <>
To   "" <>
Subject   st: import csv, retain headers Stata11.2
Date   Mon, 8 Apr 2013 14:12:57 +0100

Hi all,

I'm using Stata 11.2 and have potentially multiple .csv files relating to different regions of a country to import into Stata. For the main part, the variables in each dataset are comparable, but their names are not identical. I wish to run a series of summary commands on each variable held within the data and output the results. While I can 'copy and paste' the data from Excel into an empty spreadsheet and retain the heading title of each variable, I would rather automate this. However, using -insheet- results in a loss of variable names. I cant easily use -infile- as the point is I don't know the exact names of the variables in each .csv file to specify.

I've Googled this problem and not been able to find a solution. Does anyone have one.

PS, upgrading to Stata 12 is not even remotely possible at the moment!

Best wishes


This email and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.
The information contained in this e-mail may be subject to public disclosure under the Freedom of Information Act 2000. The confidentiality of this e-mail and your reply cannot be guaranteed, unless the information is legally exempt from disclosure.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index