How to get your SAS data set attributes into Excel

I'm working on a SAS programming project with a large team. Each team member is responsible for a piece of the overall system, and the "contract" for how it all fits together is The Data. For example, I've got a piece that performs some data manipulation and produces several output data sets, and my colleagues Bryan and Cindy will then pick those up as input into their pieces. In order for this puzzle to fit together cleanly, we need to agree on library names, data set names, and the column names, lengths and formats.

So the team members have been flinging PROC CONTENTS output at each other for several weeks, in an effort to make sure that this jigsaw puzzle comes together as it should. However, I know that the team is using a spreadsheet to keep track of all of these data schemas, and so the PROC CONTENTS exercise turns into an exercise of getting the output listing into Excel.

If all you want is a quick Excel-friendly listing of your data columns and their attributes, that's easy to get from SAS Enterprise Guide. Here's how:

1. Add the data set to your SAS Enterprise Guide project. (You can accomplish this from File->Open->Data, or drag the data set file onto your process flow.)

2. In the data grid view, select the Properties button from the toolbar. The Properties window appears for your data set.

3. Select the Columns tab, then click the Copy to clipboard button.

4. Paste the result into your Excel spreadsheet.

The result: a listing of your data column attributes, with each attribute in its own column. Easy!

tags: SAS Enterprise Guide, SAS tips

3 Comments

  1. Posted August 14, 2012 at 2:39 pm | Permalink

    I would like to be cut-and-pasted to the Bahamas, please.

    :-)

    • Chris Hemedinger Chris Hemedinger
      Posted August 14, 2012 at 2:41 pm | Permalink

      There is a keyboard shortcut for that. Ctrl+ $

  2. Rahul Gupta
    Posted January 31, 2013 at 4:47 am | Permalink

    Copying SAS attributes to Excel tips is too fast. Thanks.

One Trackback

  1. By Comparing data set schemas in SAS - The SAS Dummy on August 15, 2012 at 10:04 am

    [...] post has moved! SAS Blogs Home > The SAS Dummy > Comparing data set schemas in SAS « How to get your SAS data set attributes into Excel Comparing data set schemas in SAS Chris Hemedinger|August 15, 2012 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>