BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8

I have an ods html commands which I am not sure what it is doing

it is like the following:

 

ods html file="&html_path/apple_&spmedate..xls";

proc print data=orange;

label region = "Region"

Product="Product"

.

.

.

format ...

title...

run;

ods htmk close;

 

 

please could you help, thanks.

 

 

 

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Well someone is creating an HTML file and naming it a XLS file.

Excel will probably find its bearings, and be able to open it, but that's not very clean.

 

Also you have a typo here:

ods htmk close;
ballardw
Super User

@HeatherNewton wrote:

I have an ods html commands which I am not sure what it is doing

it is like the following:

 

ods html file="&html_path/apple_&spmedate..xls";

proc print data=orange;

label region = "Region"

Product="Product"

.

.

.

format ...

title...

run;

ods htmk close;

 

 

please could you help, thanks.

 

 

 


Do you know where &html_path and &spmedate are defined?

 

Lie to the software, as in naming a file with an extension like XLS when the code creates HTML is asking for all sorts of problems. Such as settings in later version of programs that will try to open XLS that may refuse with messages about the file contents do not match the expected file type. It was poor practice 10 or more years ago and the "reason" then doesn't exist any more with ODS EXCEL as an option. Use of html means no control over sheets, sheet names and such since HTML creates one single file. OR you have to go to a lot of work to make references between documents.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 512 views
  • 0 likes
  • 3 in conversation