BookmarkSubscribeRSS Feed
Karlb
Calcite | Level 5

Hi

How can I easily read an open Excel-sheet out of the SAS-Program-window of the Excel-SAS Addin? Is there any Statement which I can use instead of "Active Excel Sheet" that works (see attached Screenshot). I know I could save the Excel-sheet, attach it with a library (libname XXX Excel "...") and then read it.

 

But is there any way to do it without saving the sheet (like the predefined statistic routines do it in the Addin).

 

Thnaks

Karl

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Not really, it would involve a fair bit of work to get the various plugins talking to each other and returning results.  Is importing the file too dificult?  If so its unlikely your going to find a simpler solution.  One thing I can suggest is that with (assumes you have SAS 9.4) libname excel and and xlsx file then you can set a libname to a file, thats a bit simpler, e.g.:

libname xl xlsx "<pathtoyourfile>/<yourfile>.xlsx";

data want;
  set xl.sheet1;
run;

libname xl clear;

The libname will show all the usable tabs in the workbook (if you goto library explorer you can actually see them).

Karlb
Calcite | Level 5

Thank you RW9  for your answere! 

No saving and importing is not really an issue.

Sincerly Karl

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Discussion stats
  • 2 replies
  • 1153 views
  • 0 likes
  • 2 in conversation