Thank you all for all your answers! Following them I still can't see a solution. Here is the code I am using to write the designed XML and then to read the xlsx file (I have many more sheets, veraibles and compute statements. I placed here an example). What I am currently doing (in line with one of the ansewers above) is having the code write both XML and xlsx files. the xml has the required design and that is the file the users views. If the user makes any manual changes the user must save the changed file as xlsx, and then the code reads either the original xlsx written by the code earlier, or the one saved by the user (regarding one of the answers, in this bussiness setting we must allow the user to make manual changes in the file).
Regarding the last reply - I am trying to use ODS excel you suggested, to write the required designed file, but right now the output using ODS Excel does not look good.
ods tagsets.ExcelXP file="/dir1/subdir2/TEST.xml" style=sansprinter;
ods tagsets.ExcelXP options(embedded_titles='yes' embedded_footnotes='yes' sheet_name="ONE" sheet_interval='table'
row_heights = '20,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15');
proc report data=TEST1 nowd split="*" spanrows
style (header)={just=c background=lightorange foreground=black font_weight=bold}
style (report)={bordercolor=black borderbottomwidth=3pt borderleftwidth=3pt
borderrightwidth=3pt};
column A B;
define A / display "A" missing format=percentn8.3
style=[just=c cellwidth=0.8in];
define B / display "B" missing format=percentn8.3
style=[just=c cellwidth=0.8in];
compute b;
if compress(b) > 0 then
call define (_COL_, 'style', 'style=[foreground=green font_weight=bold]');
if compress(b) < 0 then
call define (_COL_, 'style', 'style=[foreground=red font_weight=bold]');
endcomp;
run;
ods tagsets.ExcelXP close;
proc import
datafile="/dir1/subdir2/TEST2"
DBMS=xlsx out=A replace;
getnames=YES; SHEET='A'; run;
And similar proc import statements for each additional sheet.
Thank you for your help.
... View more