BookmarkSubscribeRSS Feed
Geeman
Fluorite | Level 6

Hi SASers,

 

I have an Excel 2010 macro file that I want to import into SAS 9.3, 32bit. I want to avoid having to rename the varible name F1 F2 F3...is there a way to import the excel sheet at line 5 is the varible names and at line 6 data starts.  Is there a way to specify datarow or namerow in the following SQL? Proc import did not work to avoid F1  F2  F3...?

 

Varible name starts at line 5

Data Starts at line 6  

 

PROC SQL ;

CONNECT TO EXCEL (PATH="C:\SAS\Programs\EaxceltoSAS\filename.XLSM" );

create table Temp as SELECT * FROM CONNECTION TO EXCEL

(SELECT * FROM [sheet2$]) ;

DISCONNECT FROM EXCEL;

QUIT;

 

 

1 REPLY 1
Reeza
Super User

You can try specifying the RANGE to include the titles and the data in a PROC IMPORT

 

This user had a similar question.

https://communities.sas.com/t5/SAS-Procedures/Proc-Import-Excel/td-p/51087

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 685 views
  • 0 likes
  • 2 in conversation