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.)
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.
Yes, I mean old-fashioned PC SAS with display manager, running locally. 😉
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"?
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 ....
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!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: