Learning SAS? Welcome to the exclusive online community for all SAS learners.

What's better in SAS?

Reply
Learner
Posts: 1

What's better in SAS?

When trying to use SAS for a Wide Variety of Excel Spreadsheets, is it best to have them all in different files? Or in one Spreadsheet file with multiple sheets?

For instance, I'm doing some things with the NBA. Would it be best to have the Rosters each on it's own spreadsheet, or just the one Excel File named NBA teams, and have different sheets for the different Rosters?

 

Thanks!

Regular Contributor
Posts: 170

Re: What's better in SAS?

Posted in reply to FreyJonathon

someone may contradict me but i think it's best to import as csv files and thus you'd want them as separate files (because csv won't allow multi tab spreadsheets). Don't have heavily formatted spreadsheets. Also, separate files seems safer to me eg you're better able to identify if data have changed, and if something becomes corrupted or lost it's limited to a single file. All the derivations etc should be done in sas, thus i don't see the need to have it together in excel

--------------
blog: papersandprograms.com
Super User
Posts: 10,571

Re: What's better in SAS?

Posted in reply to FreyJonathon

I would have two sheets, one for teams (holding information like home town, owner etc) and one for players, with a column for team (key or name).

Then you only need to export/import two files from Excel into SAS. Follow the same principle (basically what a normalized database is) for other types of information, and do all the combining etc in SAS.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Super User
Posts: 9,840

Re: What's better in SAS?

Posted in reply to FreyJonathon

It really depends on what you use the Excel files.  Is it one way traffic, i.e. just getting data into SAS, then use CSV.  If you need to update the original Excel files, or Excel files is needed as output, then you might need to look at other ways of doing it.

 

Ask a Question
Discussion stats
  • 3 replies
  • 184 views
  • 0 likes
  • 4 in conversation