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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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