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: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 431 views
  • 0 likes
  • 3 in conversation