Download presentation
Presentation is loading. Please wait.
1
Using ODS Excel Migrating from DDE to ODS
OASUS Spring or Fall YYYY Monday, May 28, 2018 Using ODS Excel Migrating from DDE to ODS Robert West Statistics Canada First & last name Company name
2
OASUS Spring or Fall YYYY
Agenda Monday, May 28, 2018 Describe the issue A Real life Problem ODS EXCEL – ExcelXP 2.0 First & last name Company name
3
A Number of Government Departments Are Moving to a Grid Envrionment
OASUS Spring or Fall YYYY Monday, May 28, 2018 A Number of Government Departments Are Moving to a Grid Envrionment First & last name Company name
4
How Does This Affect DDE?
OASUS Spring or Fall YYYY Monday, May 28, 2018 How Does This Affect DDE? If you are using Unix as an operating system like we are in STC, DDE cannot be used First & last name Company name
5
This may be a source of anxiety…
OASUS Spring or Fall YYYY Monday, May 28, 2018 This may be a source of anxiety… First & last name Company name
6
…or it just might make you angry…
OASUS Spring or Fall YYYY Monday, May 28, 2018 …or it just might make you angry… First & last name Company name
7
…and you don’t know were to turn
OASUS Spring or Fall YYYY Monday, May 28, 2018 …and you don’t know were to turn First & last name Company name
8
Fortunately we have a solution
OASUS Spring or Fall YYYY Monday, May 28, 2018 Fortunately we have a solution First & last name Company name
9
OASUS Spring or Fall YYYY
Monday, May 28, 2018 Yea! First & last name Company name
10
OASUS Spring or Fall YYYY
Describe Case Monday, May 28, 2018 Our Client at Statistics Canada was using an obsolete server which needed replacing No New or Replacement SAS Servers are to be authorized: All SAS computing to be done on the grid The Powers That Be wanted the server decommissioned yesterday The Client used DDE to create numerous reports needed for their operations DDE cannot be used on the STC SAS Grid First & last name Company name
11
Example Original Report
OASUS Spring or Fall YYYY Example Original Report Monday, May 28, 2018 First & last name Company name
12
The Same Report Created by SAS ExcelXP
OASUS Spring or Fall YYYY The Same Report Created by SAS ExcelXP Monday, May 28, 2018 First & last name Company name
13
OASUS Spring or Fall YYYY
Things to Consider Monday, May 28, 2018 DDE -> places data into specific cells in an existing Excel workbook ODS - > Places whole table(s) into a new workbook When using ODS you have to think in terms of: Complete tables The workbook cannot be edited First & last name Company name
14
OASUS Spring or Fall YYYY
Original DDE Code Monday, May 28, 2018 Macro Developed at Statcan This Macro took care of all the DDE coding First & last name Company name
15
DDE Macro used at Statcan
OASUS Spring or Fall YYYY DDE Macro used at Statcan Monday, May 28, 2018 Macro Developed at Statcan This Macro took care of all the DDE coding It was at this point in the Code that I started changing things Instead of a Macro Call, I … First & last name Company name
16
Preliminary Changes Made
OASUS Spring or Fall YYYY Preliminary Changes Made Monday, May 28, 2018 … Created a Data Set for the table Keep in mind that some of the DDE tables came from Multiple tables and which needed to be ‘put together’ before they could be used Some outputs were to a single cell so these were placed in a macro variable First & last name Company name
17
OASUS Spring or Fall YYYY
Creating the Report Monday, May 28, 2018 First & last name Company name
18
Preliminary Statements
OASUS Spring or Fall YYYY Preliminary Statements Monday, May 28, 2018 Housekeeping ODS Listing Close Makes sure that the ODS goes to an output file and not to the SAS listing Window First & last name Company name
19
Setting up the Workbook
OASUS Spring or Fall YYYY Setting up the Workbook Monday, May 28, 2018 This Part of the ExcelXP statement deals with the Work book First & last name Company name
20
OASUS Spring or Fall YYYY
Setting up Worksheet Monday, May 28, 2018 This Part of the ExcelXP statement deals with the Worksheet This creates: The column widths The worksheet name. First & last name Company name
21
OASUS Spring or Fall YYYY
Setting up Worksheet Monday, May 28, 2018 If you only have a one page Report, they can be combined First & last name Company name
22
OASUS Spring or Fall YYYY
Column Widths Monday, May 28, 2018 The column widths option is a string of numbers First & last name Company name
23
Getting Column Widths From Existing Worksheet
OASUS Spring or Fall YYYY Getting Column Widths From Existing Worksheet Monday, May 28, 2018 Used the Excel ‘Cell” Function to get the width of the cell number an integer First & last name Company name
24
Getting Column Widths From Existing Worksheet
OASUS Spring or Fall YYYY Getting Column Widths From Existing Worksheet Monday, May 28, 2018 Point 1 Point 2 Point 3 …. First & last name Company name
25
Getting Column Widths From Existing Worksheet
OASUS Spring or Fall YYYY Getting Column Widths From Existing Worksheet Monday, May 28, 2018 Make sure that the function is in all of the columns First & last name Company name
26
OASUS Spring or Fall YYYY
Coding Column Widths Monday, May 28, 2018 Paste the resultant String into the code, Use the Backspace and space keys to tidy it up First & last name Company name
27
OASUS Spring or Fall YYYY
Proc Report Monday, May 28, 2018 An Example of a Proc Report procedure First & last name Company name
28
Complete Column Statement
OASUS Spring or Fall YYYY Complete Column Statement Monday, May 28, 2018 First We Will Look at the Columns Keep in mind: The order in which the var names appear in this list is the order in which they will be in the report A var can appear more than once First & last name Company name
29
Example of Nested Columns
OASUS Spring or Fall YYYY Example of Nested Columns Monday, May 28, 2018 You can nest columns if you so wish The nested columns are enclosed in parentheses The Label for the nested columns, comes first and is in quotes First & last name Company name
30
OASUS Spring or Fall YYYY
Defining Columns Monday, May 28, 2018 Once they are listed, they may have to be defined, (keep in mind the order in which they appear has no affect on the way they are ordered in the table) First & last name Company name
31
This Reports Had (too) Many Columns
OASUS Spring or Fall YYYY This Reports Had (too) Many Columns Monday, May 28, 2018 First & last name Company name
32
Use the Concatenate function in Excel to start
OASUS Spring or Fall YYYY Use the Concatenate function in Excel to start Monday, May 28, 2018 Use the Concatenate function in Excel First & last name Company name
33
Enter the Define Statements
OASUS Spring or Fall YYYY Enter the Define Statements Monday, May 28, 2018 Copy the ‘define’ keyword down the left side First & last name Company name
34
Select the Existing Column Labels
OASUS Spring or Fall YYYY Select the Existing Column Labels Monday, May 28, 2018 Select the Column Labels from the old report First & last name Company name
35
OASUS Spring or Fall YYYY
Use Transpose-Copy Monday, May 28, 2018 Use Transpose Copy to place them into the selected column First & last name Company name
36
Enter the Variable Names
OASUS Spring or Fall YYYY Enter the Variable Names Monday, May 28, 2018 Enter the Variable name (perhaps copied from the keep statement from the dataset used to create the table) First & last name Company name
37
Insert the Style Statements
OASUS Spring or Fall YYYY Insert the Style Statements Monday, May 28, 2018 Figure out the forming for each of the variables First & last name Company name
38
Use Excel to Concatenate All the various parts
OASUS Spring or Fall YYYY Use Excel to Concatenate All the various parts Monday, May 28, 2018 Concatenate all the columns together First & last name Company name
39
Copy the Entire Column…
OASUS Spring or Fall YYYY Copy the Entire Column… Monday, May 28, 2018 First & last name Company name
40
… Into the Program Edit Window
OASUS Spring or Fall YYYY … Into the Program Edit Window Monday, May 28, 2018 First & last name Company name
41
Footnote/Title Statements
OASUS Spring or Fall YYYY Footnote/Title Statements Monday, May 28, 2018 These lines add a title to the report. In this case we are using the macro variable created earlier. First & last name Company name
42
OASUS Spring or Fall YYYY
End Statements Monday, May 28, 2018 We then close the ExcelXP, this allows ODS to create the output file Then the ods listing, which returns the output to the listing window First & last name Company name
43
OASUS Spring or Fall YYYY
Result Monday, May 28, 2018 First & last name Company name
44
Macro To Create Multiple Pages
OASUS Spring or Fall YYYY Macro To Create Multiple Pages Monday, May 28, 2018 The Workbook ExcelXP Inside the Macro the Worksheet Info The macro calls First & last name Company name
45
OASUS Spring or Fall YYYY
Result Monday, May 28, 2018 We see the data The worksheet tabs First & last name Company name
46
Create Multiple Pages Another Way
OASUS Spring or Fall YYYY Create Multiple Pages Another Way Monday, May 28, 2018 We have one ODS ExcelXP statement for each page Note we have only ONE ExcelXP close statement. First & last name Company name
47
Change Colour of Columns
OASUS Spring or Fall YYYY Change Colour of Columns Monday, May 28, 2018 Sometimes we may need to give a column a different background colour, this is how we do this. First & last name Company name
48
OASUS Spring or Fall YYYY
Result Monday, May 28, 2018 On this slide we see: The columns with a different colour background The tabs for the two worksheets First & last name Company name
49
Multiple Tables on a Single Page
OASUS Spring or Fall YYYY Multiple Tables on a Single Page Monday, May 28, 2018 For creating two tables on a Single Page, we had two proc reports First & last name Company name
50
OASUS Spring or Fall YYYY
Highlighting Rows Monday, May 28, 2018 For this output we also want to highlight some rows. To do this we us a compute block and an if statement First & last name Company name
51
OASUS Spring or Fall YYYY
Result Monday, May 28, 2018 First & last name Company name
52
OASUS Spring or Fall YYYY
Things to Remember Monday, May 28, 2018 DDE -> places data into specific cells in an existing Excel workbook ODS - > Places whole table(s) into a new workbook When using ODS you have to think in terms of: Complete tables The workbook cannot be edited First & last name Company name
53
ODS Excel (needs SAS 9.4 M3 to work)
OASUS Spring or Fall YYYY ODS Excel (needs SAS 9.4 M3 to work) Monday, May 28, 2018 Inserting graphic into a worksheet Inserting images into a worksheet Adding text to a Microsoft Excel Worksheet Using SAS formats with the Excel destination to control cell formatting First & last name Company name
54
ODS Excel Creating Filters and Freezing Panes Create Excel Formulas
SAS can read File Created by ODS Excel Generating smaller files
55
A paper from this year’s SAS Global Forum
OASUS Spring or Fall YYYY A paper from this year’s SAS Global Forum Monday, May 28, 2018 This paper, (copies are available) covers the new ODS Excel First & last name Company name
56
Inserting Graphics into a worksheet: Code
OASUS Spring or Fall YYYY Inserting Graphics into a worksheet: Code Monday, May 28, 2018 Some option statements ODS graphics to place the graph into the worksheet Defining the graph First & last name Company name
57
Inserting Graphics into a worksheet
OASUS Spring or Fall YYYY Inserting Graphics into a worksheet Monday, May 28, 2018 Canadian Army divides its units into Corps Logistics Royal Canadian Artillery Royal Canadian Armoured Corp Royal Canadian Corps of Signals Royal Canadian Engineers Royal Canadian Infantry Corp First & last name Company name
58
Inserting images into a worksheet
OASUS Spring or Fall YYYY Inserting images into a worksheet Monday, May 28, 2018 First & last name Company name
59
Inserting images (watermarks) into a worksheet
OASUS Spring or Fall YYYY Inserting images (watermarks) into a worksheet Monday, May 28, 2018 Watermark badge of the RCAF. Per Ardua Ad Austra (through adversity to the Stars First & last name Company name
60
Adding Text Using PROC ODSTEXT
OASUS Spring or Fall YYYY Adding Text Using PROC ODSTEXT Monday, May 28, 2018 First & last name Company name
61
This Can Be Used To Create a Title Page
OASUS Spring or Fall YYYY This Can Be Used To Create a Title Page Monday, May 28, 2018 First & last name Company name
62
Adding Text Using ODS TEXT
OASUS Spring or Fall YYYY Adding Text Using ODS TEXT Monday, May 28, 2018 First & last name Company name
63
OASUS Spring or Fall YYYY
Used To Create A Title Monday, May 28, 2018 First & last name Company name
64
Using Proc Report to Create Formats
OASUS Spring or Fall YYYY Using Proc Report to Create Formats Monday, May 28, 2018 We had an expanded way to add formats to the data. Without using the define statement First & last name Company name
65
OASUS Spring or Fall YYYY
Resulting Example Monday, May 28, 2018 First & last name Company name
66
Freezing Rows and Columns, Adding an Filter
OASUS Spring or Fall YYYY Freezing Rows and Columns, Adding an Filter Monday, May 28, 2018 We can also employ Frozen header Frozen Rows Filters First & last name Company name
67
OASUS Spring or Fall YYYY
Example Monday, May 28, 2018 First & last name Company name
68
Utilizing the Formula Option
OASUS Spring or Fall YYYY Utilizing the Formula Option Monday, May 28, 2018 First & last name Company name
69
OASUS Spring or Fall YYYY
Example Monday, May 28, 2018 First & last name Company name
70
SAS Can Read Files Created by ODS Excel
OASUS Spring or Fall YYYY SAS Can Read Files Created by ODS Excel Monday, May 28, 2018 ODS Excel creates Output files in native XLSX format Therefor SAS can import a file created by ODS Excel First & last name Company name
71
ODS Excel Create a Smaller Output File
OASUS Spring or Fall YYYY ODS Excel Create a Smaller Output File Monday, May 28, 2018 First & last name Company name
72
OASUS Spring or Fall YYYY
Monday, May 28, 2018 If This presentation as felt like this: I have prepared some example files for you. Which can be found… First & last name Company name
73
Questions Robert West robert.west@Canada.ca
System Engineering Division Statistics Canada Jean-Talon Building 5-A7 170, Tunney’s Pasture driveway Ottawa, Ont., K1A 0T6 (613)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.