Reads data into memory from a plain text file (delimited by commas or tabs).
insheet using "filepath\datafromexcel.txt"
. insheet using "people.txt"
(4 vars, 1 obs)
- The option , clear specifies that Stata reads in the data
(which means clearing the memory first), even if there is already a
dataset in memory and it has changed since it was last modified.
- insheet takes the first line of the file as the variable names. Stata automatically
figures out if you file is delimited by commas or tabs.
- To save your new data set, use the command
- See also input and the official
Stata help on infiling for all methods of reading in data.
- See the official Stata help for insheet