stATA 导入EXCEL 并附加值标签
. export excel using "D:\statashu\221.xls", firstrow(variables) nolabel //将当前表导出为xls,第一行作为标题,没有值标签 //导入xls,第一行作为变量名 import excel "D:\statashu\221.xls", sheet("Sheet1") firstrow clear //建立值标签 origin label define origin 0 "Domestic",modify label define origin 1 "Foreign",modify //将值标签附加给变量foreign label values foreign origin