sas and dde - statistics data exchange outline 1 dynamic data exchange dynamic data exchange...
TRANSCRIPT
Dynamic Data Exchange
SAS and DDE
JC Wang
wang (WMU) SAS and DDE Lecture 18 1 / 8
Dynamic Data Exchange
Outline
1 Dynamic Data ExchangeDynamic Data ExchangeResourcesUsing DDE
wang (WMU) SAS and DDE Lecture 18 2 / 8
Dynamic Data Exchange
What is DDE?
DDE, Dynamic Data Exchange, is a built-in protocal in MicrosoftWindows that allows applications to share data (chat amongapplications, that is)
wang (WMU) SAS and DDE Lecture 18 3 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
Use DDE with Excel in SAS
can dump SAS data directly into cells in Excelcan easily format cells (colors, fonts, outlines, etc)can write formulas to cellscan create/kick off macros from within SAScan issue system commands such as saving workbook to files,rename worksheets, etc.
wang (WMU) SAS and DDE Lecture 18 4 / 8
Dynamic Data Exchange
SUGI Papers
Besides SAS help documentation for Windows, many SUGI paperscovered this topic, two important ones:
“Using Dynamic Data Exchange to Export Your SAS Data to MSExcel — Against All ODS, Part I —” SUGI 26 (Paper 11-26) byKoen Vyverman.“Creating Custom Excel Workbooks from Base SAS with DynamicData Exchange: A Complete Walkthrough” SUGI 27 (Paper190-27) by Koen Vyverman.
wang (WMU) SAS and DDE Lecture 18 5 / 8
Dynamic Data Exchange
SUGI Papers
Besides SAS help documentation for Windows, many SUGI paperscovered this topic, two important ones:
“Using Dynamic Data Exchange to Export Your SAS Data to MSExcel — Against All ODS, Part I —” SUGI 26 (Paper 11-26) byKoen Vyverman.“Creating Custom Excel Workbooks from Base SAS with DynamicData Exchange: A Complete Walkthrough” SUGI 27 (Paper190-27) by Koen Vyverman.
wang (WMU) SAS and DDE Lecture 18 5 / 8
Dynamic Data Exchange
SUGI Papers
Besides SAS help documentation for Windows, many SUGI paperscovered this topic, two important ones:
“Using Dynamic Data Exchange to Export Your SAS Data to MSExcel — Against All ODS, Part I —” SUGI 26 (Paper 11-26) byKoen Vyverman.“Creating Custom Excel Workbooks from Base SAS with DynamicData Exchange: A Complete Walkthrough” SUGI 27 (Paper190-27) by Koen Vyverman.
wang (WMU) SAS and DDE Lecture 18 5 / 8
Dynamic Data Exchange
Using DDE
Prerequisite for using DDE: both client and server applications are upand running. A client/server DDE communication link is initiated bymeans of a special form of the SAS filename statement in two ways:
DDE triplet :
FILENAME fileref DDE ’<server app>|<topic>!<item>’;DDE ‘doublet’ :
FILENAME fileref DDE ’<server app>|system’;
wang (WMU) SAS and DDE Lecture 18 6 / 8
Dynamic Data Exchange
Using DDE
Prerequisite for using DDE: both client and server applications are upand running. A client/server DDE communication link is initiated bymeans of a special form of the SAS filename statement in two ways:
DDE triplet :
FILENAME fileref DDE ’<server app>|<topic>!<item>’;DDE ‘doublet’ :
FILENAME fileref DDE ’<server app>|system’;
wang (WMU) SAS and DDE Lecture 18 6 / 8
Dynamic Data Exchange
Using DDE
Prerequisite for using DDE: both client and server applications are upand running. A client/server DDE communication link is initiated bymeans of a special form of the SAS filename statement in two ways:
DDE triplet :
FILENAME fileref DDE ’<server app>|<topic>!<item>’;DDE ‘doublet’ :
FILENAME fileref DDE ’<server app>|system’;
wang (WMU) SAS and DDE Lecture 18 6 / 8
Dynamic Data Exchange
DDE Triplet Example<server app> = excel<topic> = [myXcel.xlsx]sheet1, [myXcel.xlsx]my data sheet<item> = r1c1:r10c3
wang (WMU) SAS and DDE Lecture 18 7 / 8
Dynamic Data Exchange
DDE Triplet Example<server app> = excel<topic> = [myXcel.xlsx]sheet1, [myXcel.xlsx]my data sheet<item> = r1c1:r10c3
wang (WMU) SAS and DDE Lecture 18 7 / 8
Dynamic Data Exchange
DDE Triplet Example<server app> = excel<topic> = [myXcel.xlsx]sheet1, [myXcel.xlsx]my data sheet<item> = r1c1:r10c3
wang (WMU) SAS and DDE Lecture 18 7 / 8
Dynamic Data Exchange
DDE Triplet Example<server app> = excel<topic> = [myXcel.xlsx]sheet1, [myXcel.xlsx]my data sheet<item> = r1c1:r10c3
wang (WMU) SAS and DDE Lecture 18 7 / 8
Dynamic Data Exchange
Examples of Writing to ExcelUsing DDE doublet
in the form of (in DATA _NULL_):
PUT ’[system-command]’;
PUT ’[save.as("f:\myXcel.xlsx")]’; — save excelPUT ’[format("Courier", 200, true, false, false,false, 3, false, false)]’; — change font“font name”, font size, bold, italic, underline, strike-through, color,outline, shadowPUT ’[workbook.name("sheet1","my SAS data")]’; —rename sheet
wang (WMU) SAS and DDE Lecture 18 8 / 8
Dynamic Data Exchange
Examples of Writing to ExcelUsing DDE doublet
in the form of (in DATA _NULL_):
PUT ’[system-command]’;
PUT ’[save.as("f:\myXcel.xlsx")]’; — save excelPUT ’[format("Courier", 200, true, false, false,false, 3, false, false)]’; — change font“font name”, font size, bold, italic, underline, strike-through, color,outline, shadowPUT ’[workbook.name("sheet1","my SAS data")]’; —rename sheet
wang (WMU) SAS and DDE Lecture 18 8 / 8
Dynamic Data Exchange
Examples of Writing to ExcelUsing DDE doublet
in the form of (in DATA _NULL_):
PUT ’[system-command]’;
PUT ’[save.as("f:\myXcel.xlsx")]’; — save excelPUT ’[format("Courier", 200, true, false, false,false, 3, false, false)]’; — change font“font name”, font size, bold, italic, underline, strike-through, color,outline, shadowPUT ’[workbook.name("sheet1","my SAS data")]’; —rename sheet
wang (WMU) SAS and DDE Lecture 18 8 / 8
Dynamic Data Exchange
Examples of Writing to ExcelUsing DDE doublet
in the form of (in DATA _NULL_):
PUT ’[system-command]’;
PUT ’[save.as("f:\myXcel.xlsx")]’; — save excelPUT ’[format("Courier", 200, true, false, false,false, 3, false, false)]’; — change font“font name”, font size, bold, italic, underline, strike-through, color,outline, shadowPUT ’[workbook.name("sheet1","my SAS data")]’; —rename sheet
wang (WMU) SAS and DDE Lecture 18 8 / 8