BookmarkSubscribeRSS Feed
anab
Calcite | Level 5

I have to export a huge number of html's files to the same directory. So far I have had to select the directory every time I have exported the file. I would like to know if it is possible to fix this path or, otherwise, if there is any option SAS to remember the last selected directory.

7 REPLIES 7
TomKari
Onyx | Level 15

Should be doable, but more information is needed. How are these HTML files created?

 

Do you have a code segment that demonstrates creating one and saving it to a directory?

 

Tom

anab
Calcite | Level 5

The HTML are created from a summary table, as you can see in the image I attach. Once it is created, I export it as a part of the proyect to another html, located in the directory I want to have all the html files. This directory is want I want to fix in order not to write or copy it everytime. 

 

Thanks for the answer,

Ana B.

Reeza
Super User
How are you exporting these files? If you're doing it one by one that's definitely inefficient. You can usually set the path to be somewhere and they'll go there by default or use FCOPY() or Copy task to move them at once.
anab
Calcite | Level 5

Yes, until now I have being doing one by one, but now I have many htmls to export and, indeed, it is so inefficient. 

As you say, what I want to set the path to somewhere, but I don't know how to do it. 

 

Thanks for the answer.

Reeza
Super User
Yeah, add in a step to each program that outputs the files directly to a folder, you may need a program or custom task. Sorry, I don't have EG to play around with anymore.

ods html5 file='demo.html' path='C:\_localdata\temp' style=meadow;

proc print data=sashelp.class;

ods html5 close;

That's an example of how a program could be written. Then you could add it to each step or add one big program to export all tables at once.
TomKari
Onyx | Level 15

My apologies, I've played around with it and based on how you've structured your project, I can't find a solution.

 

Fortunately, a lot of SAS employees monitor these posts, and I know several who have forgotten more about html than I ever knew.

 

I hope you find a solution!

   Tom

Reeza
Super User
You can also open a ticket directly with SAS Support and they can help you navigate this.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1110 views
  • 0 likes
  • 3 in conversation