Hi All, Could you please check my issue with Proc Report Sas. I'm using SAS 9.4 Entrprise Guide 7.15 HF7. I'm trying save report in excel but one column is out of report. Is some restrictions for max columns in report? I didn't find information about it. Is not matter what is the column, always last is in AZ Excel. When I choose less columns in report then everything is ok. In sas report result look fine. I attached xlsx file and sas program with code (is nothing special but maybe will be helpful for you to find issue). Many thanks for your support. I have one warring for below code: 'WARNING 1-322: Assuming the symbol SUMMARIZE was misspelled as sumarize.' Here is my code: filename Report "\\fs01\usersbs\mariusz.milbrant\testOdsrent\rent_sas.xlsx";
ods excel file= Report
options(embedded_titles='yes'frozen_headers='yes');
title "Client Rent &id_klient for the period &rok_p._&miesiac_pod - &rok_k._&miesiac_kdo";
proc report data=work.rent_client spanrows ;
Options missing=0;
col year month net_rofit net_cost profit_cost margin
net_rofit_worker net_cost_worker profit_cost_worker marigin_worker
net_rofit_compain_person net_cost_compain_person profit_cost_compain_person margin_compain_person
net_rofit_kids net_cost_kids profit_cost_kids margin_kids
net_rofit_child net_cost_child profit_cost_child margin_child
net_rofit_senior net_cost_senior profit_cost_senior margin_senior;
define year / group style(column)={vjust=center just=center};
define month / group style(column)={vjust=center just=center};
define net_rofit / sum format=comma18.2;
define net_cost /sum format=comma18.2;
define profit_cost / computed format=comma18.2;
define margin / computed format= percentn10.2;
define net_rofit_worker /sum format=comma18.2;
define net_cost_worker /sum format=comma18.2;
define profit_cost_worker /computed format=comma18.2;
define marigin_worker / computed format= percentn10.2;
define net_rofit_compain_person /sum format=comma18.2;
define net_cost_compain_person /sum format=comma18.2;
define profit_cost_compain_person /computed format=comma18.2;
define margin_compain_person / computed format= percentn10.2;
define net_rofit_kids /sum format=comma18.2;
define net_cost_kids /sum format=comma18.2;
define profit_cost_kids /computed format=comma18.2;
define margin_kids / computed format= percentn10.2;
define net_rofit_child /sum format=comma18.2;
define net_cost_child /sum format=comma18.2;
define profit_cost_child /computed format=comma18.2;
define margin_child / computed format= percentn10.2;
define net_rofit_senior /sum format=comma18.2;
define net_cost_senior /sum format=comma18.2;
define profit_cost_senior /computed format=comma18.2;
define margin_senior / computed format= percentn10.2;
rbreak after /sumarize ;
compute profit_cost;
profit_cost=net_rofit.sum-net_cost.sum;
endcomp;
compute margin;
margin=((net_rofit.sum-net_cost.sum) / net_rofit.sum);
endcomp;
compute profit_cost_worker;
profit_cost_worker=net_rofit_worker.sum-net_cost_worker.sum;
endcomp;
compute marigin_worker;
marigin_worker=((net_rofit_worker.sum-net_cost_worker.sum)/net_rofit_worker.sum);
endcomp;
compute profit_cost_compain_person;
profit_cost_compain_person=net_rofit_compain_person.sum-net_cost_compain_person.sum;
endcomp;
compute margin_compain_person;
margin_compain_person=((net_rofit_compain_person.sum-net_cost_compain_person.sum)/net_rofit_compain_person.sum);
endcomp;
compute profit_cost_kids;
profit_cost_kids=net_rofit_kids.sum-net_cost_kids.sum;
endcomp;
compute margin_kids;
margin_kids=((net_rofit_kids.sum-net_cost_kids.sum)/net_rofit_kids.sum);
endcomp;
compute profit_cost_child;;
profit_cost_child=net_rofit_child.sum-net_cost_child.sum;
endcomp;
compute margin_child;
margin_child=((net_rofit_child.sum-net_cost_child.sum)/net_rofit_child.sum);
endcomp;
compute profit_cost_senior;
profit_cost_senior=net_rofit_senior.sum-net_cost_senior.sum;
endcomp;
compute margin_senior;
margin_senior=((net_rofit_senior.sum-net_cost_senior.sum)/net_rofit_senior.sum);
endcomp;
run;
ods excel close; There is result of xlsx file. Best Regards Mariusz.
... View more