You want to automate your work by just clicking run? And all the data comes in one Excel file?

I would say let’s be lazy and do that 🙂

Try:

Proc export data = filename

outfile= “path” /*where you want to export the results*/

dbms= xlsx /*Since we are exporting it in excel*/

replace /*So that it automatically replaces the existing sheet/file*/;

sheet= “Give valid sheet name”

e.g.,

I want to export a table :

/*Proc Export*/

PS: You can also assign macro to the path and use it as a reference, like how I referenced “&path” in outfile statement.

If you don’t know how to create and assign a macro, simply paste the path.

Learn about creating and assigning macros in my upcoming SAS course.

User Avatar

By RichS

Leave a Reply

Your email address will not be published. Required fields are marked *