Help using Base SAS procedures

Applying formats while importing Excel into sas

Reply
N/A
Posts: 0

Applying formats while importing Excel into sas

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.
Valued Guide
Posts: 2,175

Re: Applying formats while importing Excel into sas

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?
Super Contributor
Super Contributor
Posts: 3,174

Re: Applying formats while importing Excel into sas

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.
Ask a Question
Discussion stats
  • 2 replies
  • 152 views
  • 0 likes
  • 3 in conversation