BookmarkSubscribeRSS Feed
SteveDenham
Jade | Level 19

Hey Reeza,

This is a chance to pull out my favorite rant about folks who put data in Excel, and then proceed to format the spreadsheet with blank rows or columns that they then squeeze into obliviion.  Nothing like pulling in twice as many rows as there are observations, with a boatload of additional variables named F?? that are all null values.  Thanks lab guys who think they are helping.

Steve Denham

Reeza
Super User

Smiley Happy Agreed, hidden columns and rows drive me up the wall.

GreggB
Pyrite | Level 9

Regarding the topic of cleaning the Excel file, I usually do this (although I admit this is rather inelegant).

Open the Excel file and press Ctrl + End to find the last cell that contains data.  Suppose you find that it is in Column X Row 246.

Then, you can write your SHEET option as SHEET='Sheet11$a1:x246';

ballardw
Super User

Depending on version of Excel the Ctrl-End will find the last row someone manipulated. That row could very well be completely blank. Also you may find yourself in a column way past actual data entered for any record, or at least visible.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 3040 views
  • 2 likes
  • 7 in conversation