I want ods to create a table of content.
But it is empty.
I'd like to reference in the TOC every table the proc generates.
the trace on statement reveals the distinct tables:
And I have another challenge. How Do I output comments to the destination?
Imagine having a proc freq followed by a proc sgplot.
I want to add a comment lines BETWEEN the proc output so that I can guide the reader.
ods word file="/caslibs/marketing/&tab._topn.docx" options(contents="on" toc_data="on" keep_next="on");
title "Top 10 Freq";
ods proclabel=" ";
proc cas; action freqTab.freqTab /displayOut={names={"OneWayFreqs"="out2"}}
tabDisplay={format= "list", maxLevels=10,missingFreq=false} order= "FREQ",
descending=false,table={name="ALEX_PPNC_HIST_V1", caslib="&casy."}
tabulate={'Mes_Actual', 'Codigo_marca', 'Mes_actual_poliza', 'Tipo', 'Tipo_de_tarifa_de_seguro', 'Num_Siniestros',
'Top_modelo', 'Grupo_duracion_contrato', 'Meses_contables_operacion', 'Tipo_de_cliente', 'Estado_operacion', 'Poliza_cancelada',
'Operacion_viva', 'Poliza_en_riesgo_informe_TAM', 'Anyo_Vencimiento_operacion', 'NIF_CIF'};
run;
ods word close;
Last time I checked ODS WORD is still not production.
I would recommend ODS RTF and then if a docx file format is required to use your word processor to change from RTF to docx.
Ok, with an ODS text="your text"; line I can add text between proc outputs.
In the generated docx I can select the table to "insert caption". Then I create a table of figures and it recognizes the different tables.
Can I force the tables to have caption, i.e. the pathname from the trace log?
I've seen that the ods pdf generates what I'm looking for.
But can ods word do the same?
Last time I checked ODS WORD is still not production.
I would recommend ODS RTF and then if a docx file format is required to use your word processor to change from RTF to docx.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.