Hi,
I am trying to write code to create a SAS dataset from an Excel file. There are no variable Names in the Excel file. I want to be able to read in the Excel file and create the SAS file and have the system create Variable names, not use the first observation as the variable name.
This is my code:
libname excel "H:\Testing\testfile.xls";
libname temp "c:\Temp";
data temp.new_sas_file;
set excel."Sheet1$"N;
run;
proc print;
title1 "Test file";
run;
libname excel clear;
It creates fine, but the first observation is used as the variable names.
Also, can you tell me what the 'N' stands for in the set statement? I thought maybe it meant NO for get names.
I created it fine using the PROC IMPORT, but wanted another way.
Can someone tell me what I am doing wrong.
Thanks, Nancy