sas - Export multiple datasets to multiple sheets(Imp: excluding variable name/label in datasets) -


i have few datasets have export excel.

for example: dataset: ds1

variable_1 variable_2 variable_3

datax datay dataz

dataset: ds2

variable_a variable_b variable_x

dataxxx datayyy datazzz

requirement:

export these datasets excel sheet out variable names/labels. example excel sheet should like: datax datay dataz

i.e., out variable names/labels , data.

i tried using proc export dbms csv

proc export data=ds1 dbms=csv outfile="ds1_data.csv" replace; putnames=no; run;  proc export data=ds2 dbms=csv outfile="ds2_data.csv" replace; putnames=no; run; 

it working fine putnames="no" option.

however creates multiple csv files. need single excel sheet multiple sheets (with out variable names)

any options available?

@kay can write way.

proc export data=ds1 dbms=xls outfile="ds1_data.xls" replace; putnames=no; sheet=ds1; run;  proc export data=ds2 dbms=xls outfile="ds1_data.xls" replace; putnames=no; sheet=ds2; run; 

give sheet name and, change dbms xls , give same location file have more 1 datasets in same excel workbook. sheet= option might not work when dbms = csv if not wrong.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -