BookmarkSubscribeRSS Feed

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-199200 - 299300 - 399400 - 499500 - 599600 - 699700 - 799800- 899900-11001100+

R

0.02547145
3 REPLIES 3
Reeza
Super User

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.

Reeza
Super User

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 414 views
  • 0 likes
  • 2 in conversation