TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 Copy and Paste from Excel to SAS Dr. Arthur Tabachneck, Director Data Management with a LOT of help from: datanull, Ben Powell, Alan Churchill, Nathan Derby, Randy Herbison and Richard Devenezia
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 Suppose you have data in an Excel workbook
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 that you want to copy and paste into a SAS table
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 and suppose that you don’t have SAS/Access interface to PC file formats and/or you need more control over formats, informats and/or variable names than proc import provides
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 a solution a small SAS program that uses the filename ‘clipboard’ method and a data step you could, of course, expand the data step to include all desired assignments
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 the results (test case with 29,184 records) using either method
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 the results (test case with 29,184 records) using the clipboard method using proc import
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 Open a SAS session containing the desired code the solution Open the worksheet in Excel, highlite the desired cells and click ctrl-c (i.e., copy) Run the SAS code
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 made possible because of SAS-L (
TASS Meeting Copy and Paste from Excel to SAS September 19th, 2008 Questions?