Dear Statalisters,

I'm quite new to Stata and I've run into what seems like a very "basic" problem. I would like to export my dataset from Stata to a csv file, but instead of having variable names on the first row, I need to have variable labels. I know that this is possible for exporting to excel with the code below, but for creating text files this option doesn't seem to exist. Am I missing something here? Is there any easy way to "go around" this? Of course the excel file can then be saved as a csv file, but I'm trying to avoid any additional steps here.

export excel using "test.xlsx", firstrow(varlabels)

Thank you in advance!

Best regards,
Elina