01-25-2018 02:51 AM
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).
01-25-2018 05:34 AM
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).
01-25-2018 12:36 PM
Thank you RW9 for your answere!
No saving and importing is not really an issue.