Subscribe Bookmark RSS Feed

Printing List of Columns (variables?)

miller_jl_3

Community Trekker

Joined:

Aug 19, 2015

Just checking to see if this is available...Is there a way to print out the entire list of columns/variables in a study (with short and long names) for reference?  With a very large database, it can sometimes be difficult to navigate through the list and could be handy to have an entire printout if available.  Thanks!

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Here is a simple script that will copy all of your column names into a column, which you can then do anything you want.

Names Default To Here( 1 );

dt = Current Data Table();

newdt = New Table( "columns",

   New Column( "Column Names",

   character,

   values( dt << get column names ) 

);

Jim
ms

Super User

Joined:

Jun 23, 2011

A quick way to get all column names to the clipboard: Click in the columns field in the tables left panels, type cmd-A and cmd-C (ctrl-A and ctrl-C in Windows).

Paste the list into your favorite editor and print.

(The columns panel is even more useful for changing multiple column names by simply pasting them from another application)