Melanie,
It seems that the various worksheets you are trying to append together are rather heterogeneous. This is going to be a slow, painstaking task, and it is going to be difficult to coach the process from a distance without being able to see the actual data. This not unusual: spreadsheets were developed with a view to organizing data for the human eye: analysis and compatibility with statistical software were at best secondary considerations in their design.
It also seems that these worksheets include some which look very different to human eyes than they do to Stata.
So here's what I suggest. Rather than trying to put them all together in one fell swoop, import each one separately into Stata. Then go through the Stata imports one by one, starting with -describe- to see which variables they contain, and in which storage types. Then use Stata to transform each of these imports to a common set of variable names and types and save those separately. Finally, run a loop to -append- together the transformed Stata data sets.
In the end, it's the same as trying to do everything in one loop, but dealing with only one data set at a time is likely to be less confusing and less frustrating.
Welcome to the wonderful world of spreadsheet data management.
It seems that the various worksheets you are trying to append together are rather heterogeneous. This is going to be a slow, painstaking task, and it is going to be difficult to coach the process from a distance without being able to see the actual data. This not unusual: spreadsheets were developed with a view to organizing data for the human eye: analysis and compatibility with statistical software were at best secondary considerations in their design.
It also seems that these worksheets include some which look very different to human eyes than they do to Stata.
So here's what I suggest. Rather than trying to put them all together in one fell swoop, import each one separately into Stata. Then go through the Stata imports one by one, starting with -describe- to see which variables they contain, and in which storage types. Then use Stata to transform each of these imports to a common set of variable names and types and save those separately. Finally, run a loop to -append- together the transformed Stata data sets.
In the end, it's the same as trying to do everything in one loop, but dealing with only one data set at a time is likely to be less confusing and less frustrating.
Welcome to the wonderful world of spreadsheet data management.

Comment