Hi everyone
I am exporting a data set to excel using this data step
data _null_;
set ERS_CMP.CMP_ERS_MQ12 (obs = 100);
file "/CEGSAS/ERS/MQ12_TESTE.xls";
put (_all_) (:);
run;
The question is:
Is it a way to export to excel when you don't have the excel engine, or do i really need to have a excel engine
to export datas to excel?
I opened the MQ12_TESTE.xls but the values looks like as txt file.
Thanks
I happen to prefer using the excel engine. However, you may be able to accomplish what you need by using the ExcelXP tagset. Take a look at: http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html
I happen to prefer using the excel engine. However, you may be able to accomplish what you need by using the ExcelXP tagset. Take a look at: http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html
Mr. art
To do exports to excel do I need to have SAS/ACCESS?
Not with the tagsets
Hi Mister Art. I have a question regarding to tagsets.excelxp. When i run the second code below, the first sheet1 doesn't appear in the want.xls file, I mean is overwrited by the second execution. Is the a way to insert datas into many sheets using tagsets.excelxp? I do need to have more than one ods tagsets command because each one is belongs to its proccess.
ods tagsets.excelxp file = "c:\want.xls" options (sheet_name = 'sheet1');
proc print data = have1 noobs;
run;
ods tagsets.excelxp close;
ods tagesets.excelxp file = "c:\want.xls" options (sheet_name = 'sheet2');
proc print data = have2 noobs;
run;
ods tagsets.excelxp close;
Augusto: try it after commenting out the first close statement. i.e.:
ods tagsets.excelxp file = "c:\art\want.xls" options (sheet_name = 'sheet1');
proc print data = sashelp.class noobs;
run;
*ods tagsets.excelxp close;
ods tagesets.excelxp file = "c:\art\want.xls" options (sheet_name = 'sheet2');
proc print data = sashelp.class noobs;
run;
ods tagsets.excelxp close;
BTW, It is either Dr. Art or just Art. "Mister" makes me feel to old
Hi Dr. Art.
Well, I guees..I am in trouble, because actually I have these codes separated each one in its process. not like I've shown here. I have one process called export_data1.sas and other export_data2.sas that must be processed separated and the results are exported to the same excel in separated sheets.
Why not just save the resulting file from the first process as a permanent file then, when you run the second process, print both files?
I will do this. Is the only way.
Here in Brazil we usually call Mister those we think that have the power to know.
Thanks Art
thanks art. you helped me again.
Try changing the file extension from XLS to CSV. That way when you double click on the file in Windows Explorer Excel should recognise it as a delimited file.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.