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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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