BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

Can you please suggest any solution on applying formats while importing excel file into sas.I am able to apply formats once excel has been imported into sas rather than that I would like to apply formats before importing it into sas (before creating a sas dataset).

Regards,
Samuel.
2 REPLIES 2
Peter_C
Rhodochrosite | Level 12
I don't understand your question. How is there a difference to the data in SAS, when it is formatted before it is in SAS or after?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Using a DATA step approach for "importing Excel" data, you have complete control of the SAS INFORMATs that are used with the INPUT processing logic.

I don't use PROC IMPORT and so I don't know of a way to override SAS PROC IMPORT and its GUESSINGROWS determination by supplying your own INFORMAT statement that gets generated by SAS during the PROC IMPORT process?

Although, depending on the data-format, it may be possible to use a SAS variable that has been "input" and then use a PUT function to assign your own variable, rather than looking for a "hook" to override SAS.

Suggest the OP explain in more detail what input and output should appear like, and ideally, if available, contribute actual SAS-generated log as a post/reply to the forum detailing the challenge. You're better off providing specific instance condition rather than just asking an open-ended question as has been done with this post.

Scott Barry
SBBWorks, Inc.

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
  • 2 replies
  • 784 views
  • 0 likes
  • 3 in conversation