Hello everybody!
I am kindly asking you some help inherent the extraction of a dataset from stata to excel.
I have a panel data and to extract it from Stata to excel I use this command:
export excel "NAME_OF_EXCEL_FILE", firstrow(varlabels) sheet("NAME_OF_EXCEL_SPREADSHEET") sheetreplace
And this works well.
The problem is that sometimes I have to select only specific variables (using the command "keep"), and in doing this all the observations disappears. But this is correct and I want to extract this new dataset (containing only varlables and no observations) into an excel file.
The problem is that when I run the command above, I encounted the r198 saying "too many or no observations specified".
Is there a way to export the dataset to excel? (in this way it would be only an ampty dataset with just varlabels and no observations)
I guess I have to write additional conditions but I can't find a solution..
Many thanks!
Kodi
I am kindly asking you some help inherent the extraction of a dataset from stata to excel.
I have a panel data and to extract it from Stata to excel I use this command:
export excel "NAME_OF_EXCEL_FILE", firstrow(varlabels) sheet("NAME_OF_EXCEL_SPREADSHEET") sheetreplace
And this works well.
The problem is that sometimes I have to select only specific variables (using the command "keep"), and in doing this all the observations disappears. But this is correct and I want to extract this new dataset (containing only varlables and no observations) into an excel file.
The problem is that when I run the command above, I encounted the r198 saying "too many or no observations specified".
Is there a way to export the dataset to excel? (in this way it would be only an ampty dataset with just varlabels and no observations)
I guess I have to write additional conditions but I can't find a solution..
Many thanks!
Kodi
Comment