SAS之EXPORT-导出数据

1、导出txt 或 csv 文件:
proc export data = work.data_&month
outfile = "F:\数据支撑\TEST_&month..txt"
dbms = dlm;
delimiter = '09'x;

sp:delimiter = '09'x 为设置分隔符,此处分隔符为tab

2、导出到excel
proc export data = work.data_&month
outfile = "F:\数据支撑\TEST_&month..xlsx"
dbms = xlsx replace;
sheet = 'sheet1' ;

sp: replace 选项:替换已有文件;

注:一般后缀名就决定了导出文件的格式,也可以通过 dbms =选项 来指定;