[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-243237-105":53,"doc-detail-243237-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","paper-2182-2015-using-the-sas-output-delivery-system-ods-and-the-template-procedure-to-replace-dynamic-data-exchange-dde","Paper 2182-2015 - Using the SAS Output Delivery System (ODS) and the TEMPLATE Procedure to Replace Dynamic Data Exchange (DDE)","","Many SAS papers explain how to use Dynamic Data Exchange (DDE) to move data from SAS to Excel. This paper demonstrates an alternative approach using the SAS Output Delivery System (ODS) together with the TEMPLATE procedure, focusing on producing publication-standard Excel workbooks from SAS output. It walks through practical formatting techniques for Excel—numeric formats, font effects such as superscripting, cell borders, and text justification—using STYLE elements built with PROC TEMPLATE.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/paper-2182-2015-using-the-sas-output-delivery-system-ods-and-the-template-procedure-to-replace-dynamic-data-exchange-dde/243237/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/paper-2182-2015-using-the-sas-output-delivery-system-ods-and-the-template-procedure-to-replace-dynamic-data-exchange-dde/243237.png","ImageObject",442,249,{"name":88,"@type":89},"วิน","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-19","2026-09-12",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",10,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What problem does the paper address compared with Dynamic Data Exchange (DDE)?","Question",{"text":109,"@type":110},"It replaces the DDE-based method of exchanging data from SAS to Excel by using SAS Output Delivery System (ODS) and the TEMPLATE procedure to achieve equivalent Excel output formatting.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How does PROC TEMPLATE format numbers in the Excel output?",{"text":114,"@type":110},"It defines a STYLE element (for example, using a tag attribute format string) and applies that style to selected variables so the exported Excel values display with the desired decimal places.",{"name":116,"@type":107,"acceptedAnswer":117},"What kinds of Excel formatting are covered besides numeric formats?",{"text":118,"@type":110},"The paper covers font formatting (including superscript-like display), cell borders, and font justification for exported values.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},243237,1791720986,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":76},2336475104736,"https://ap-avatar.wpscdn.com/avatar/22000c4c5e0e5b17e70?x-image-process=image/resize,m_fixed,w_180,h_180&k=1786591360781797222","Paper 2182-2015  \nUsing the SAS® Output Delivery System (ODS) and the TEMPLATE Procedure to Replace Dynamic Data Exchange (DDE)  \nPeter Timusk, Centre for Special Business Projects, Statistics Canada  \nABSTRACT  \nMany papers have been written over the years that describe how to use Dynamic Data Exchange (DDE) to pass data from SAS® to Excel. This presentation aims to show you how to do the same exchange with the SAS Output Delivery System (ODS) and the TEMPLATE Procedure.  \nINTRODUCTION  \nThis paper demonstrates techniques using the TEMPLATE procedure and the STYLE element to format Excel workbooks output with SAS Output Delivery System (ODS) . There have been many papers over the years explaining how to format Excel workbooks using the Dynamic Data Exchange (DDE) method of communicating with Excel from SAS. The author has often found these papers online and used these DDE techniques to deliver publication standard Excel workbooks containing statistics from Statistics Canada surveys.  \nClients prefer Excel workbooks and in using Excel templates these clients have an ability to define statistical estimates and population and sub-population requirements. The production programmer has only to calculate the statistics in SAS and then place the results in the client’s Excel template for publication as an Excel workbook.  \nMore SAS user papers these days show how to use ODS and PROC TEMPLATE to achieve the same formatting results with Excel workbooks. This paper contributes to these papers and will demonstrate some formatting techniques important in the author’s programming statistics for publication in Excel workbooks. It is hoped that future SAS programmers will find many published example papers for using ODS, as we can now find for DDE.  \nUSING THE TEMPLATE PROCEDURE  \nThroughout we will show a simple PROC TEMPLATE and a DEFINE STYLE to make a new STYLE element using various STYLE attributes to format Excel. This is the technique and code used by, Nate Derby and Colleen McGahan in their 2013 SAS Global Forum paper: Maintaining Formats when Exporting Data from SAS® into Microsoft® Excel®, also with the Class dataset. We will first apply a numeric format as these authors did, then extend this to a font format, then a cell format and finally a font justification format. Then we will use all of these together to end the examples. For many more possible formats see the references section.  \nFORMATING NUMBERS  \nHere we use PROC TEMPLATE and a STYLE element to format two variables height and weight from the Class dataset with the STYLE element “data_num” to display two decimal places in the Excel output:  \nproc template;  \ndefine style styles.mystyle;  \nparent = styles.default;  \nstyle data_num from data / tagattr= 'format:0 . 00' ;  \nend;  \nquit;  \nods tagsets.excelxp file=\"&folder output from excelxp, numeric formatting with proc templatenumberformat.xls\" style=mystyle ;  \nproc print data=sashelp.class;  \nvar name sex age ;  \nvar height weight / style ( data )=data_num; run;  \nods tagsets.excelxp close ;  \n(NOTE: the code in this paper is drawn from examples in (Derby & McGahan, 2013),(DelGobbo, 2012) and SAS documentation and then extended to other formats.)  \nThe format used is set using a tagattr and this string 'format:0 .00'  \nDisplay 1 Excel with Numeric Formatting  \nFORMATING FONTS  \nHere we use the PROC TEMPLATE and a STYLE element to format the variable age from the Class dataset with the STYLE element “super_up” to appear as superscripted data points in the Excel output:  \nproc template;  \ndefine style styles.mystyle;  \nparent = styles.default;  \nstyle super_up from data / fontsize= 8pt verticalalign=top; end;  \nquit;  \nods tagsets.excelxp file=\"&folder output from excelxp, font formatting with proc templatesuperup.xls\" style=mystyle ;  \nproc print data=sashelp.class;  \nvar name sex;  \nvar age / style ( data )=super_up; run;  \nods tagsets.excelxp close ;  \nSuperscripting using the attribute “super” seems possible in a STYLE","cbCaip39FM20mU6y","https://ap.wps.com/l/cbCaip39FM20mU6y","pdf",459938,9,"English","# INTRODUCTION\n## USING THE TEMPLATE PROCEDURE\n## FORMATING NUMBERS\n## FORMATING FONTS\n## MORE STYLE ELEMENTS\n## FORMATING CELLS\n## FORMATING JUSTIFICATION OF FONTS","[{\"question\":\"What problem does the paper address compared with Dynamic Data Exchange (DDE)?\",\"answer\":\"It replaces the DDE-based method of exchanging data from SAS to Excel by using SAS Output Delivery System (ODS) and the TEMPLATE procedure to achieve equivalent Excel output formatting.\"},{\"question\":\"How does PROC TEMPLATE format numbers in the Excel output?\",\"answer\":\"It defines a STYLE element (for example, using a tag attribute format string) and applies that style to selected variables so the exported Excel values display with the desired decimal places.\"},{\"question\":\"What kinds of Excel formatting are covered besides numeric formats?\",\"answer\":\"The paper covers font formatting (including superscript-like display), cell borders, and font justification for exported values.\"}]","Paper 2182-2015 - Using the SAS Output Delivery System (ODS) and the TEMPLATE Procedure to Replace Dynamic Data Exchange (DDE) | PDF",1789201797]