SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Export to Excel column names from Explorer window

Frequent Contributor
Posts: 75

Export to Excel column names from Explorer window


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 ?

Super Contributor
Super Contributor
Posts: 3,174

Re: Export to Excel column names from Explorer window

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.
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation