BookmarkSubscribeRSS Feed
Sasuser52
Fluorite | Level 6

What is the best way to import (or read) an Excel file from within an interactive SAS session while the same Excel file has simultaneously been opened by the same user?

 

(I have the impression that this is possible when the Excel file is on a remote server share, but not for files which are located at the local drive.)

4 REPLIES 4
Quentin
Super User

By "interactive session" you mean old-fashioned PC SAS with display manager, running locally?   Certainly PC SAS is happy to read Excel files stored locally.

BASUG is hosting free webinars ! Check out recordings of our past webinars: https://www.basug.org/videos. Save the date for our in person SAS Blowout on Oct 18 in Cambridge, MA. Registration opens in September.
Sasuser52
Fluorite | Level 6

Yes, I mean old-fashioned PC SAS with display manager, running locally. 😉

ballardw
Super User

Proc Import does not handle files that are opened by an application that 'locks' access to a file.

So I suspect you will not be able to get that approach to work.

 

A very old, fragile, no longer supported by Microsoft approach using DDE may work. I'm not going to provide any example as some of the code elements are actually dependent on which Office/ file version is used.

 

A real question would be "why must the file be open"?

Sasuser52
Fluorite | Level 6

Thank you for your answer. 😊 I guess there is no nice way to do this. It would be convenient to have it. Now I have a lot of closing the Ecxel file, running a SAS programm, opening the Excel file, changing something, closing the file, running the SAS programm, opening the file ....

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 513 views
  • 0 likes
  • 3 in conversation