SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
eshupp
Obsidian | Level 7

I frequently use the "View in Excel" right click context menu command to view files in the SAS Windows UI but would like to get rid of titles and column labels so that i can see the variable names instead of the labels.  I can eliminate the titles by submitting a title; prior to the view command but have not been able to eliminate the generation of labels.  Is there any way to modify the process to do this short of modifying the dataset?  Another oddity is that when labels are generated they are in multiple rows rather than in a single row.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

I don't know if it's possible to change the GUI command but you can control all of that if you do it via code rather than the GUI.

 

Use either ODS EXCEL or PROC EXPORT - EXPORT Is likely closer to what you want.

 

proc export data=sashelp.class outfile='/home/fkhurshed/Class.xlsx' dbms=xlsx replace; run;

@eshupp wrote:

I frequently use the "View in Excel" right click context menu command to view files in the SAS Windows UI but would like to get rid of titles and column labels so that i can see the variable names instead of the labels.  I can eliminate the titles by submitting a title; prior to the view command but have not been able to eliminate the generation of labels.  Is there any way to modify the process to do this short of modifying the dataset?  Another oddity is that when labels are generated they are in multiple rows rather than in a single row.


 

View solution in original post

4 REPLIES 4
Reeza
Super User

I don't know if it's possible to change the GUI command but you can control all of that if you do it via code rather than the GUI.

 

Use either ODS EXCEL or PROC EXPORT - EXPORT Is likely closer to what you want.

 

proc export data=sashelp.class outfile='/home/fkhurshed/Class.xlsx' dbms=xlsx replace; run;

@eshupp wrote:

I frequently use the "View in Excel" right click context menu command to view files in the SAS Windows UI but would like to get rid of titles and column labels so that i can see the variable names instead of the labels.  I can eliminate the titles by submitting a title; prior to the view command but have not been able to eliminate the generation of labels.  Is there any way to modify the process to do this short of modifying the dataset?  Another oddity is that when labels are generated they are in multiple rows rather than in a single row.


 

eshupp
Obsidian | Level 7

Thanks for the alternative suggestion.  After some additional thought I determined that if I submit the following before doing a view the output is formatted the way I want:

TITLE;

OPTIONS NOLABEL;

 

This is an accep

eshupp
Obsidian | Level 7

I solved my problem by submitting OPTIONS NOTITLE; TITLE; before  performing "View in Excel".

Tom
Super User Tom
Super User

You can customize how Explorer works in Display Manager. 

image.png

Here is what the current entry that you are using looks like:

image.png

Looks like it is currently calling some SCL program that SAS supplied. 

AFA C=SASHELP.EXPLORER.EXCEL_TABLE_OPEN.SCL LIBRARY='%8b' TABLE='%32b';

You probably cannot change that program.  It is not clear if it has a option to NOT use the labels. 

 

But you could always either associate this menu item with a different command or make a new menu item that does what you want.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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