BookmarkSubscribeRSS Feed
spyds
Calcite | Level 5

Hi everyone,

Sometimes the Excel extension resources I import are inaccessible due to node error, I want to check if this table is accessible with a macro, otherwise I want to unload this table and load it again with the .sashdat extension.

is this possible?

for example to algorithm(I am a beginner about sas syntax, I gave a general description);
if x table can accessible
   do nothing
else 
   unload x table
   load x table.sashdat

3 REPLIES 3
Tom
Super User Tom
Super User

Are you using SAS Add-In for Microsoft Office?

If so are you asking for help with Excel programming? Or SAS programming?

 

Or are you just using normal SAS to access some type of Excel file, like an XLSX file?

spyds
Calcite | Level 5

Hi, sorry my explanation is not detailed enough. I am using sas viya and i am accessing some data by importing excel documents instead of database connection. 

Sometimes these datas that i import are not available due to node errors, so i need the solution that includes the algorithm i mentioned upside, thanks.


AMSAS
SAS Super FREQ

@spyds I'm not clear on what you are attempting to do. 
It sounds like you are asking if there's a way in SAS to identify if a file exists or not - In which case you need to look at SAS Functions (see External File functions) and specifically FILEEXIST Function 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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