BookmarkSubscribeRSS Feed
JohnT
Quartz | Level 8
Hi,

We're running SAS 9.2 on a Windows environment.

We were previously on 9.1.3, and I'm quite confident, but can't check this anymore that when you right click on a SAS dataset in the Explorer windows and select View in Excel the column headings would come out as the Names as opposed to the Labels.

We use this feature a lot to do very quick analysis on a small set of data, which typically involve copying a very small amount of records (eg five records).

Without writing code (eg proc export) everytime to do this, how can I get the SAS 9.1.3 functionality back in terms of exporting the column names?

Side tracking a bit, but is there a way to always show the column names by default when I look at a dataset in SAS ?


Thanks,
-John
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Looking at the SAS-generated code, it appears that SAS 9.2 does include the PROC PRINT option "LABEL" which causes the behavior you are seeing. I don't know of a way to change this code (maybe there is a template file somewhere - contact tech support if it is important enough?), however you can change the behavior with the SAS statement below (it converts the data-string to a comment):

MACRO label /*LABEL*/ %

Scott Barry
SBBWorks, Inc.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 1 reply
  • 1227 views
  • 0 likes
  • 2 in conversation