Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Insheet Command Problem

From   "Sarah Edgington" <>
To   <>
Subject   st: RE: Insheet Command Problem
Date   Thu, 14 Jun 2012 13:45:17 -0700

Insheet doesn't allow you to pull in a subset of the data.  The [varlist] in
insheet is used when you want to declare the names that Stata should use
when importing the data, but if you do specify a varlist it has to contain
names for every variable.

Is the file too big to simply insheet the whole thing?  It seems to me like
the easiest solution would be to keep the variables of interest after
reading the entire data set.  Of course if the data is prohibitively large
that won't work.  

Do you have any options about what format that data comes in?  If the data
were fixed width instead of comma delimited you could use infile to just
read the columns of interest.


-----Original Message-----
[] On Behalf Of Davia Downey
Sent: Thursday, June 14, 2012 1:15 PM
Subject: st: Insheet Command Problem

Hello All,

I need to truncate a very large census file. I only need a few variables
from the file so I am using the in sheet command with the variables I want
read in listed in the command. However, the file still isn't loading. The
error code I keep getting back is not helpful and the file is too large to
open in Excel.

The code I use is:
insheet year quarter county earnhiras earnhirns hiras hirn using
"qwi_la_se_county_naics3_all.csv", names

The error I get is:

too few variables specified
error in line 4508597 of file

Is there something else I can try? I really need to get at this data and ca=
nnot for the life of me figure out what other command to use to pull out th=
e specific data/variables I need.

Davia Cox Downey
Assistant Professor of Public Administration School of Public, Nonprofit &
Health Administration Grand Valley State University

242C DeVos Center
401 West Fulton Street
Grand Rapids, MI  49504

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index