DATA Step, Macro, Functions and more

how to read a excel file to create datasets?

Reply
Occasional Contributor
Posts: 12

how to read a excel file to create datasets?

Hi all,

 

I have a list of dataset name in excel format and wondering is there anyway to read the list to create datasets accordingly? 

thank you

 

Thanks

Occasional Contributor
Posts: 12

how to read excel then create datasets?

Hi all,

 

I have a list of dataset name in excel format and wondering is there anyway to read the list to create datasets accordingly? 

thank you

 

Thanks

Super User
Posts: 11,343

Re: how to read excel then create datasets?

Accidental repost?

Super User
Posts: 7,758

Re: how to read excel then create datasets?


ballardw wrote:

Accidental repost?


Fixed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,343

Re: how to read a excel file to create datasets?

Short snarky answer: Yes.

 

Better would be to provide a small example of the data as text involved and a description of what you are wanting to do with the result.

For example is this a list of data files external to SAS that you want to read into SAS? File structructures and types can make a big difference in how each file is treated if so. Is it a list of SAS data sets that you want to run the same analysis or manipulation on? Again contents will have an impact on how much  automation may be practical.

Occasional Contributor
Posts: 12

Re: how to read a excel file to create datasets?

my mistaken to miss out the attachment. Attached excel file with a list of the name of datasets.

(The original list contains more than 60 datasets' name)

The mission is to read this excel file then create dataset one by one. Hope someone can provide me a sample code that I can reference. Thanks in advance.

Super User
Posts: 11,343

Re: how to read a excel file to create datasets?

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

 

Given the NAME of a file, how do we know what to do with it? Are the files of the same structure and content?

Ask a Question
Discussion stats
  • 6 replies
  • 138 views
  • 0 likes
  • 3 in conversation