1
votes

I am using sas 9.2 and i want top import a cell value from a spreadsheet the value i want are F4 located in the sheet "data beskrivelse"

This i what i do:

proc import out=TESTER
  datafile="&request_in"
  dbms=XLS replace;
  RANGE="data beskrivelse$F4:F5";
run;

And it works ok, but the result is that the column name gets the value in F4 and the data from F5 is imported. So my sas dataset has ha column where the header name are the value of F4.

if i change the range in proc import to

proc import out=TESTER
  datafile="&request_in"
  dbms=XLS replace;
  RANGE="data beskrivelse$F4:F4";
run;

I'll get the whole column imported from the spreadsheet.

So basically i want the value from F4 to be imported into my sas dataset in variable A

1

1 Answers

0
votes

Oh i managed to figure it out, the solution is to use the getnames option in proc imort it says wether to import as names or not. so i changed to this

proc import out=TESTER
 datafile="&request_in"
 dbms=XLS replace;
 getnames=NO;
 RANGE="data beskrivelse$F4:F4";
run;

and i get the value in as data in my dataset.