Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

SAS Proc Import Specific Range from xlsm file

I’m in the need of importing an xlsm file and pulling just one cell value from a specific spreadsheet.

I’ve tried using the below but get a ‘CLI error trying to establish connection’ error. I do have to use the rsubmit blocks. What am I doing wrong?

RSUBMIT INHERITLIB=(mywork);
OPTIONS msglevel=i VALIDVARNAME= any;

proc import datafile="\\mysite.com\folder1\folder2\myfile.xlsm"
dbms=EXCELCS replace out=Output;
range="EmailSummary$O5";
run;

ENDRSUBMIT;

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you want to import only one cell then you need to tell IMPORT not to look for names and also give it both the upper left and lower right cell of the range.

  getnames=no;
  range="EmailSummary$O5:O5";
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading