Hi, I have this code and want to populate the excel speadsheet below by DDE. For some reason only the first cell will populate and the others won't, any idea why please? The ROW number is 93 and spread from COLUMN 3 - 11.
%macro outbal(var);
proc means data=Additional_Dataset sum;
var balance_outstanding;
where &var.=1;
output out=&var._balance(drop=_type_ _freq_) sum=;
run;
data &var._balance;
set &var._balance;
percent=balance_outstanding/&total_bal.;
balance_outstanding=balance_outstanding/1000000;
run;
%mend (var);
%outbal(unsec_resless199);
%outbal(unsec_resless299);
%outbal(unsec_resless399);
%outbal(unsec_resless499);
%outbal(unsec_resless599);
%outbal(unsec_resless699);
%outbal(unsec_resless799);
%outbal(unsec_resless899);
%outbal(unsec_resless1100);
%outbal(unsec_resplus1100);
data all_unsec_balance;
set
unsec_resless199_balance
unsec_resless299_balance
unsec_resless399_balance
unsec_resless499_balance
unsec_resless599_balance
unsec_resless699_balance
unsec_resless799_balance
unsec_resless899_balance
unsec_resless1100_balance
unsec_resplus1100_balance;
run;
filename odata dde
"Excel|G:\Mortgages\Optimum\Reporting Challenger\[Co-Op MI Credit Risk.xlsx]Data!R96C3:R96C11" notab ;
DATA _NULL_;
SET all_unsec_balance;
FILE odata dlm='09'x;
PUT percent;
RUN;
Lo-199 | 200 - 299 | 300 - 399 | 400 - 499 | 500 - 599 | 600 - 699 | 700 - 799 | 800- 899 | 900-1100 | 1100+ | |
R | 0.02547145 |
If you're exporting to a specific range why not try a straight proc export instead of DDE?
Im new to DDE so im unsure as to how I do that.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.