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.

By RichS

Leave a Reply

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


Fatal error: Uncaught wfWAFStorageFileException: Unable to save temporary file for atomic writing. in /home/beasjrbr/quantfinanc.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:34 Stack trace: #0 /home/beasjrbr/quantfinanc.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(658): wfWAFStorageFile::atomicFilePutContents('/home/beasjrbr/...', '<?php exit('Acc...') #1 [internal function]: wfWAFStorageFile->saveConfig('livewaf') #2 {main} thrown in /home/beasjrbr/quantfinanc.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 34