Copyright © 2010, Meta-Xceed, Inc. All rights reserved. BI Flash and all other Meta-Xceed Inc. product or service names are registered trademarks or trademarks.

Slides:



Advertisements
Similar presentations
The essentials managers need to know about Excel
Advertisements

© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Using Macros and Visual Basic for Applications (VBA) with Excel
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Copyright © 2009, Biddle Consulting Group, Inc. 1 Using the Export Wizard Training Presentation Click on the screen or press the right arrow key (  )
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
Excel Tutorial 6 Managing Multiple Worksheets and Workbooks
Excel application for accounting principles. Contents (1) The content of Excel screen. (2) The Excel ribbon. (3) How to create new workbooks. (4) Excel.
MICROSOFT OFFICE 2013 EXCEL 1. 2 File Tab 1 Title Bar 5. Group 7 Name Box 6 Active Cell 8 Formula Bar 4 Ribbon 9 Column 10. Row 11 Sheet Tabs 12 View.
EXCEL PART1. Objectives  Understand spreadsheet software  Tour the Excel 2010 window  Understand formulas  Enter labels and values and use the Sum.
COMPREHENSIVE Excel Tutorial 2 Formatting a Workbook.
Copyright © 2004 Prentice-Hall. All rights reserved. 1 Essentials Excel 2003 – Level 1 Project 1: Taking a Tour of Excel 2003.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
A guide for UICET for using Wikispaces.  A wiki is a web page or collection of web pages that can be linked together as a website.  Wikis are often.
Excel Part 2 Formatting a Workbook. XP Objectives Format text, numbers, and dates Change font colors and fill colors Merge a range into a single cell.
Working with a Database
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Air Quality System Precision and Accuracy Data Transaction Generator (AQSP&A) Training Session.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
October 2003Bent Thomsen - FIT 3-21 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
Microsoft Excel By: Dr. K.V. Vishwanath Professor, Dept. of C.S.E,
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
1 Data List Spreadsheets or simple databases - a different use of Spreadsheets Bent Thomsen.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. 3-1 Office Excel 2007 Lab 3 Managing and Analyzing a Workbook.
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
SPREADSHEET BASICS SPREADSHEET BASICS What are the benefits of using a spreadsheet to solve a problem?
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
Remember…  Please do not…  Change the background.  Change the icons.  Change the font. Use Times New Roman (size 12 font).  Use color. We cannot print.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Chapter 1: Introduction to SAS  SAS programs: A sequence of statements in a particular order  Rules for SAS statements: –Every SAS statement ends in.
M AKE E ASY S TYLE T EMPLATES U SING SAS M ACRO Barbara Harlan.
Chapter 17 Creating a Database.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
Define your Own SAS® Command Line Commands Duong Tran – Independent Contractor, London, UK Define your Own SAS® Command Line Commands Duong Tran – Independent.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Excel 2010 © 2011 The McGraw-Hill Companies,
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Microsoft® Excel Key and format dates and times. 1 Use Date & Time functions. 2 Use date and time arithmetic. 3 Use the IF function. 4 Create.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
Spreadsheets 101 What is Excel?. Objectives 1. Identify the parts of the Excel Screen 2. Identify the functions of a spreadsheet 3. Identify how spreadsheets.
Spreadsheets What is Excel?. Objectives 1. Identify the parts of the Excel Screen 2. Identify the functions of a spreadsheet 3. Identify how spreadsheets.
Introducing Dreamweaver. Dreamweaver The web development application used to create web pages Part of the Adobe creative suite.
Microsoft Excel ( XP-2003). Return to Table of Contents Table of Contents 1_ Introduction to ExcelIntroduction to Excel 2_ Overview of the Excel.
B Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Working with PDF and eText Templates.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
SAS Programming Training Instructor:Greg Grandits TA: Textbooks:The Little SAS Book, 5th Edition Applied Statistics and the SAS Programming Language, 5.
Creating Web Pages with Links, Images, and Embedded Style Sheets
ODS TAGSETS - a Powerful Reporting Method Derek. 2 Agenda Understanding the tagset How to use tagsets Conclusion.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Copyright © 2008, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Copyright 2009 The Little Engine That Could: Using EXCEL LIBNAME Engine Options to Enhance Data Transfers between SAS® and Microsoft® Excel Files William.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Build your Metadata with PROC CONTENTS and ODS OUTPUT Louise S. Hadden Abt Associates Inc.
Better Metadata Through SAS® II: %SYSFUNC, PROC DATASETS, and Dictionary Tables.
Microsoft Excel Illustrated Introductory Workbooks and Preparing them for the Web Managing.
Using SAS to Create Multi-Sheet Excel Workbooks
Excel Tutorial 8 Developing an Excel Application
Microsoft Excel.
Instructor: Raul Cruz-Cano
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Microsoft Excel All editions of Microsoft office.
Beautiful PROC CONTENTS Output Using the ODS Excel Destination
Spreadsheets and Data Management
Microsoft Excel 2007 – Level 2
Presentation transcript:

Copyright © 2010, Meta-Xceed, Inc. All rights reserved. BI Flash and all other Meta-Xceed Inc. product or service names are registered trademarks or trademarks of Meta-Xceed Inc. in the USA and other countries. ® indicates USA registration. You use SAS®, Your boss uses Excel, Guess where your results are going to appear! (Part 2): DIGGING DEEPER INTO ODS to put your SAS data and results into Excel. William E Benjamin Jr, Owl Computer Consultancy, LLC, Phoenix, Arizona

Agenda The Problem - Moving Data to Excel Using ODS Early Methods – DDE, CSV and others A New Method – ODS and Tagsets What is a “Tagset” ? How do You find a Tagset How does a Tagset Work?

Agenda Focus - SAS Data to Excel via ExcelXP Tagset Getting the new SAS updated ExcelXP Installing the ExcelXP Tagset Understanding the ExcelXP tagset

Agenda Using the ExcelXP Tagset −Hello World Project −Tagset options −Style Commands −Using SAS Vars as Excel Formulas −SAS Can Send Hyperlinks to Excel −Create Multi-Sheet workbooks −Table of Contents – Click to Your Desired Page Conclusion

The Problem – Data to Excel Most Company PC’s have Excel Installed Many Company Programmers/Analysts use SAS Programmers Collect and Report the Data Management Often Uses Excel Managers Use and Explain the Results Within Excel

The Problem – Data to Excel Many Ways to Convert from SAS to Excel Dissimilar Results from Different Methods Most Transfer Methods Require Manual Excel Editing to produce final results

An Early Method – DDE One of the first transfer methods Available from the SAS Data step Based Upon Microsoft Standards Time intensive to Setup for use Cell by Cell control of Excel results Not Available in SAS® Enterprise Guide Subject of a Previous Paper

An Early Method – CSV One of the first transfer methods Available from the SAS Data step One of the first ODS output destinations Simple to use Limited control of Excel results May Require Manual Formatting in Excel

An Early Method – CSV PROC EXPORT DATA=SASHELP.SHOES OUTFILE="C:\wuss_2010\Shoes_1a.csv" DBMS=CSV REPLACE; Run;

An Early Method – CSV Here is a sample of the output file: "Obs","Region","Product","Subsidiary","Stores","Sales","Inventory","Returns" " 1","Africa","Boot","Addis Ababa","12"," $29,761"," $191,821"," $769" " 2","Africa","Men's Casual","Addis Ababa"," 4"," $67,242"," $118,036"," $2,284" " 3","Africa","Men's Dress","Addis Ababa"," 7"," $76,793"," $136,273"," $2,433“ -- More data – "393","Western Europe","Sport Shoe","Rome","14"," $9,969"," $74,848"," $549" "394","Western Europe","Women's Casual","Rome"," 2"," $19,964"," $62,256"," $954"

An Early ODS Method – CSV ODS CSV body='f:\WUSS_2010\Shoes_1a.csv'; PROC PRINT DATA=SASHELP.SHOES ; RUN; ODS CSV CLOSE;

An Early ODS Method – CSV Here is a sample of the output file: "Obs","Region","Product","Subsidiary","Stores","Sales","Inventory","Returns" " 1","Africa","Boot","Addis Ababa","12"," $29,761"," $191,821"," $769" " 2","Africa","Men's Casual","Addis Ababa"," 4"," $67,242"," $118,036"," $2,284" " 3","Africa","Men's Dress","Addis Ababa"," 7"," $76,793"," $136,273"," $2,433“ - More data – "393","Western Europe","Sport Shoe","Rome","14"," $9,969"," $74,848"," $549" "394","Western Europe","Women's Casual","Rome"," 2"," $19,964"," $62,256"," $954"

A New Method - ODS & Tagsets

What is a “Tagset” ?

A New Method - ODS & Tagsets A “Tagset” is a “Mediator”

A New Method - ODS & Tagsets

How do You find a Tagset

A New Method - ODS & Tagsets

How does a Tagset Work?

A New Method - ODS & Tagsets SAS Code or Procedure Sends Data to ODS ODS Uses a Tagset to Direct / Encode Outputs Outputs are Formatted (XLM/HTML/Others) Target Programs Analyze the Outputs Target Programs Visualize the Data Target Programs Include Excel, Word, Adobe, Browsers

A New Method - ODS & Tagsets SAS Code ODS Data Title Footnote Proc XML/HTML EXCEL MS/Word PDF Browser s

SAS Data to Excel via ExcelXP Getting the new SAS updated ExcelXP As of October 16, 2010 the version available was SAS Compatible, v1.116, 08/25/10

SAS Data to Excel via ExcelXP Installing the ExcelXP Tagset Save Tagset file somewhere to load into the SAS Editor Load the Tagset code into the SAS editor (NOTE * You Need the ability to write to SASUSER libname) Execute the Tagset code by any way you want. (Choose a “RUN” option, PF Key, or click the “Running Man Icon”)

SAS Data to Excel via ExcelXP

SASUSER and SASHELP May both be writable Only write into SASUSER Path order is Important

SAS Data to Excel via ExcelXP Understanding the ExcelXP tagset Start by Executing the following SAS Program: ODS tagsets.excelxp file="test.xml" options(doc="help"); Run;

Understanding the ExcelXP tagset The Results Will be Something Like This A Listing Will be Produced followed by a message (the listing may be at least an 8 page printed help file): ========================================================== NOTE: This is the Excel XP tagset (Compatible with SAS and above, v1.116, 08/25/10). Add options(doc='help') to the ods statement for more information.

That is why they are there !!!! READ THE INSTRUCTIONS !

? Understanding the ExcelXP tagset

Tagset Code does not run sequentially Tagset Code Units are Defined Tagset Code Units are Triggered Tagset Code Units are Similar to Macros Tagset Code Units are Magical If You do not write them, …. THAT IS ALL YOU NEED TO KNOW Understanding the ExcelXP tagset

Using the ExcelXP Tagset Declare You want to use the ExcelXP Tagset ods tagsets.excelxp file=‘c:\my_file.xls’;

Using the ExcelXP Tagset Let’s start simple: The Hello World Project… (Shamelessly borrowed directly from the ExcelXP Tagset Help output listing…)

Hello World Project *Get Started – Open a Tagset and an Excel file (*.xml); ods tagsets.excelxp file='test1.xml' options(zoom='75');

Hello World Project data test; length a b 8 c $20; input a b c $; cards; =RC[-2]+RC[-1] 3 4 =RC[-2]+RC[-1].. =SUM(R[-3]C:R[-1]C) run;

Hello World Project * Option added to hide spreadsheet periods; Options missing = ‘ ‘; proc print noobs; var a b; var c / style(head) = {flyover="Hello World"} style(data) = {cellwidth=50pt}; run;

Hello World Project * Now end the job; ods tagsets.excelxp close; run; * added to reset the default missing display; Options missing = ‘.’;

Hello World Project

Tagset options Let us examine some simple tagset options 1.zoom='75' 2.sheet_interval='bygroup' 3.sheet_label='By ' 4.row_heights='40'

Tagset options ods tagsets.excelxp file='test3.xml' options(zoom='75' sheet_interval='bygroup' sheet_label='By ' row_heights= '40');

Tagset options Lets get some simple data(straight from SAS); proc sort data=sashelp.shoes out=tmp; by Region Product Sales; run;

Tagset options Now Print the sorted file; proc print data=tmp noobs; by region ; sum sales; var product; var sales / style(data) = {cellwidth=50pt }; Run;

Tagset options * Now quit; ods tagsets.excelxp close; run;

Tagset options

Style Commands SAS9 Reporting Procedure Styles Tip Sheet

Style Commands One Simple command: var sales / style(data) = {cellwidth=50pt };

Using SAS Vars as Excel Formulas Data converted to a formula: Remember this data: =SUM(R[-3]C:R[-1]C) In Excel you saw: 15 Which really was =sum(c2:c4) in Excel-eaze

Using SAS Vars as Excel Formulas Everything is relative to the current cell! 15 was in cell ‘c5’ So… =SUM(R[-3]C:R[-1]C) Means add the column of cells in the current row minus 3, and the current column; until the current row minus 1, and the current column. Then put the result here. (3+5+7=15)

SAS Can Send Hyperlinks to Excel ods tagsets.excelxp file='Z:\WUSS_2010\test5.xml' style =Gears ; proc sort data=sashelp.shoes out=shoes1; by Region Product Subsidiary Sales ; run;

SAS Can Send Hyperlinks to Excel *remove spaces, special chars from var used as sheet name (Primary By variable); data shoes1; set shoes1; x = 1; do until (x eq 0); x = index(left(trim(region)),' /') ; region = translate(left(trim(region)),'_',' '); region = translate(region,'_','/'); end; drop x; run;

SAS Can Send Hyperlinks to Excel ods tagsets.excelxp options (sheet_label = 'Table of contents') ; title1 'Worldwide Show Sales by Region‘; data comments (keep=comments); retain counter 1; attrib comments length = $ 90; comments = '____________________________'; output; comments = 'This Excel Workbook contains '; output; comments = 'several sheets with one for '; output; comments = 'each region of the world '; output; comments = '____________________________'; output; comments = ' Regions displayed '; output; comments = '____________________________'; output; comments = 'Left Click title to see data '; output; comments = '____________________________'; output;

SAS Can Send Hyperlinks to Excel * output one record for each region; do until (eof); set shoes1 end=eof; by region; if first.region then do; counter + 1; *Build an Excel hyperlink to a new page in same workbook; comments = '=HYPERLINK("[test5.xml]' || left(trim(put(region,$char30.))) || '!A1", "' || left(trim(put(region,$char30.))) '")'; output; end;

SAS Can Send Hyperlinks to Excel * write text at bottom of table of contents page; comments = '____________________________'; output; comments = ' CAUTION - CHANGING THE '; output; comments = ' NAME OF THE WORKBOOK '; output; comments = ' MAY INVALIDATE THE '; output; comments = ' HYPERLINKS IN THE FILE '; output; comments = '____________________________'; output; stop; proc print data=comments noobs label; run;

Create Multi-Sheet workbooks ods tagsets.excelxp options(zoom='75' sheet_interval='bygroup' sheet_label=' ' row_heights= '40,20' Gridlines= 'Yes ') ; proc print data=shoes1 noobs; by region ; sum sales; var product Subsidiary / style(data) = {font_size=14pt}; var sales / style(data) = {cellwidth=50pt font_size=12pt}; run;

Create Multi-Sheet workbooks ***************************************************************; ** Close up and go home. **; ***************************************************************; ods tagsets.excelxp close; title; run;

-- Table of Contents -- Click to Your Desired Page

Conclusion WOW

Conclusion William E Benjamin Jr Owl Computer Consultancy, LLC Phoenix AZ