ProBBQ Excel 20 Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Barbrque & Grills ProBBQ Excel 20 herunter. Choosing the Right SAS® and Excel Tool Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 98
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
1
Choosing the Right Tool from Your SAS
®
and
Microsoft Excel
®
Tool Belt
2997 Yarmouth Greenway Drive, Madison, WI 53711
Phone: (608) 278-9964 • Web: www.sys-seminar.com
Seitenansicht 0
1 2 3 4 5 6 ... 97 98

Inhaltsverzeichnis

Seite 1 - Tool Belt

1Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool Belt2997 Yarmouth Greenway Drive, Madison, WI 53711Phone: (608) 278-9964 • Web: www.s

Seite 2

10What About Excel Capabilities?• Excel is a much more interactive and simple to use tool. • It is very easy to use and learn.• Users can begin using

Seite 3 - Free SAS Newsletter

11Are SAS and Excel Structures Similar?Shapes of SAS, Excel data usually close enough to make transfer easy:• SAS datafiles, Excel worksheets are both

Seite 4 - Presenters

12What Are The SAS and Excel Structure Differences?SAS:• has a required dataset descriptor( mini data dictionary) defining columns. • columns are name

Seite 5 - Introduction

13Do SAS and Excel Use “Libraries”?SAS• Stores its data in SAS libraries. • Libraries are roughly the equivalent of a Windows or Unix directory.• Eac

Seite 6 - Sending Excel to SAS

14How Can SAS Send Information to Excel?Before we can do any transfer, are we talking about:• A SAS dataset?Or• A SAS report? We can do both!! Choosi

Seite 7 - Sending SAS to Excel

15How About Sending a SAS Report to Excel?In the past:• PROC PRINTTO could capture print.• Separately we could parse the report to create suitable inp

Seite 8 - • Are the structures similar?

16Can You Show us an Example?Suppose we write the following proc tabulate code to produce a report:proc tabulate data=softsale;title 'Softsale Sa

Seite 9 - What Are SAS Capabilities?

17Can We See the Output?Softsale Sales and Expenses by Division

Seite 10

18So How Do We Get it to Excel?We can easily route the output to HTML with a few ODS statements.ods html body='c:\temp\tabulate.html';proc t

Seite 11 - • Formatting is similar

19How Does That Help Us Get to Excel?Easy! To open the file in Excel, use File Open and specify file type HTML. Choosing the Right Tool from Your SAS

Seite 12

2This paper was written by Systems Seminar Consultants, Inc.SSC specializes in SAS software and offers:• Training Services• Consulting Services• He

Seite 13 - • Is somewhat of a library

20What Does Excel Do with the HTML File?• Excel automatically converts HTML as it reads the file.• The user may have to specify to save it as an XLS f

Seite 14 - We can do both!!

21Can We Make This Process More Transparent?Yes!• Continue to generate HTML but naming our file with .XLS. • Excel and Windows are tricked to think t

Seite 15

22Can We See the Code?options nocenter;ods html body='c:\temp\tabulate.xls' style=minimal;proc tabulate data=softsale;. . .run; ods html clo

Seite 16 - Can You Show us an Example?

23Are There Differences in Formatting?Excel may format things differently than SAS does: • Leading zeros that don‟t appear in Excel. • Text doesn‟t s

Seite 17 - Can We See the Output?

24Is There a More Controlled Way to Send Data to Excel?ODS Markup Family of Destinations:• Designed to create markup codes for easy input by other sof

Seite 18 - So How Do We Get it to Excel?

25Are the Tagsets Documented?• SAS.COM• Online Help• Run the following Program:ods tagsets.excelxp file='test.xml' options(doc='help&ap

Seite 19

26Can We See an Example Using EXCELXP?An example of a simple PROC PRINT using EXCELXP follows: ods tagsets.excelxp file='c:\temp\test.xml';

Seite 20

27What Does The Worksheet Look Like?• The Worksheet looks like the report.• Titles don‟t appear, as they are instead used as print headers.• SAS will

Seite 21 - (reduces file size

28Can I Include Titles and Specify the Sheet Name?Options are available:• Set the worksheet name prefix. • SAS will use to create a separate worksheet

Seite 22 - Can We See the Code?

29The Resulting WorksheetTitles are imbedded and each state will is in a separate tab.Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool

Seite 23

3Free SAS NewsletterThe Missing Semicolon™, shares SAS software solutions developed by our staff and provides additional technical assistance to our c

Seite 24

30While Reporting is Great, Can We Copy Data?• There are a wealth of ways to copy SAS data to Excel.• We can eliminate the reporting step.• Some requi

Seite 25 - Are the Tagsets Documented?

31Can We Copy and Paste From SAS?• Copying and pasting all the cells from a SAS dataset in the SAS VIEWTABLE window is not supported.• A single cell c

Seite 26

32What is the SAS System Viewer?• A free Windows application to view SAS data.• Download it from The SAS Institute at: http://www.sas.com/apps/demosdo

Seite 27

33Can You Show Copy and Paste In the System Viewer?In the SAS System Viewer:• Open the data set you want to send to Excel. • Select all of the rows a

Seite 28 - • Many, many more options

34Can We then Paste Into Excel?In Excel:• Use the Windows shortcut to paste (Ctrl+V).• You should be able to paste all of your data into Excel.• You m

Seite 29 - The Resulting Worksheet

35Can You Copy and Paste From Enterprise Guide?In Enterprise Guide:• Open your dataset.• Highlight all of the rows and columns you want.• Edit menu an

Seite 30

36Can Data Step Programs Send SAS Data to Excel?A data step can create a comma separated value (CSV) text file.Features:• Wide capabilities of the dat

Seite 31 - We have 2 quick options:

37Are There Drawbacks to a Data Step Program?• A Data step must be written.• You need know names of SAS columns for header rows.• You must also specif

Seite 32

38Can We See an Example?The following program creates a CSV file:data _null_;set softsale(obs=5);file 'c:\temp\test.csv' dsd;if _n_ =1 then

Seite 33 - In the SAS System Viewer:

39What Does the CSV File Look Like?File 'c:\temp\test.csv„Name,Division,Years,Sales,Expense,StateBENJAMIN,S,3,201.11,25.21,ILJENNIFER,S,1,542.11,

Seite 34 - Can We then Paste Into Excel?

Presenters44Steven J. FirstPresidentJennifer FirstDirector of Operations • Over 30 years of SAS experience, including hundreds of manufacturing, retai

Seite 35

40How Does It Look In Excel?Here is the Excel view after opening the above file.Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool Belt

Seite 36

41Wouldn’t This Be a Great Application for a Macro?There are many user written macros to create CSV files. • %SSCFLAT macro reads dictionary tables to

Seite 37

42What is DDE?Dynamic Data Exchange (DDE) is a method of dynamically exchanging information between Windows applications. • Almost any command, input

Seite 38 - Can We See an Example?

43What is Needed to Start a DDE Server?• Excel must have an open worksheet before running the SAS code.• A DDE server app can be opened using the X co

Seite 39 - SARAH,S,6,301.21,65.17,MN

44Can We See a Data Step That Writes to DDE?Example: send first 5 rows and selected columns from a SAS Excel. filename excelout dde 'excel|sheet1

Seite 40 - How Does It Look In Excel?

45What Do the Results Look Like?A Worksheet in Excel.Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool Belt

Seite 41 - • Both macros are free

46What is the SAS/Access Interface to PC File Formats?With this additionally licensed product, transfer of data becomes even easier. The product cont

Seite 42 - What is DDE?

47How Does The Export Wizard Work?• A point-and-click interface.• Guides you through reading SAS data, writing to an external file format. • External

Seite 43

48How Do You Start the Export Wizard?• Open the Export Wizard, selecting File, Export Data, Select Library. • Member window opens, select Library

Seite 44

49And Then What Happens?• The Select Export Type window opens. • Select Export Type in the Export Wizard from the drop down list, Next. Choosing the

Seite 45 - A Worksheet in Excel

5Introduction• SAS software analytics, reporting, and programming are second to none.• Excel is probably the most popular software product used today.

Seite 46

50Where Do We Give an Excel Workbook Name?• The Connect to MS Excel dialog box opens, type or Browse as needed, then OK. Choosing the Right Tool from

Seite 47

51Can We Specify a Table Name (Named Range)?The Select Table window allows a name to be typed or pulled down.Choosing the Right Tool from Your SAS®and

Seite 48

52Can You Save the Generated SAS Code?• The Create SAS statements window opens.• We can pull down or type a file for storage and later running of SAS

Seite 49 - And Then What Happens?

53Can We See the Resulting Worksheet?The worksheet looks almost identical to our SAS dataset.Notes:• Many users think this is the easiest way to send

Seite 50

54What If I Like to Code, or Need Some Special Options?The Wizards either: • Generated DATA step code.• Generated SAS/ACCESS code.• Generated code usi

Seite 51

55Can We See the Code From Our Last Example?Here are the statements and arguments saved by the wizard: PROC EXPORT DATA= WORK.SOFTSALEOUTFILE= "c

Seite 52 - • Click Finish

56Advantages/Disadvantages of PROC EXPORT?Advantages:• PROC EXPORT is a straightforward conversion.• It has many options.• It is repeatable. Disadvan

Seite 53

57Is There a LIBNAME Engine to Excel?SAS/ACCESS for PC file formats does support LIBNAME.• Probably the most simple of all techniques.• LIBNAME assign

Seite 54

58What is a “Table” in the Excel Library?The SAS documentation deals with this topic as follows: • SAS/ACCESS treats an Excel workbook as a database.•

Seite 55 - Options are available to:

59Can We See an Example?For example:• Sheet1 is a sheet name in an Excel file. • SAS treats Sheet1$ as a valid range name.• SAS must use special namin

Seite 56

6Sending Excel to SAS• Most people are familiar with Excel.• Excel provides easy navigation.• Easy data input.• Formulas, formatting, much more availa

Seite 57

60What Can The LIBNAME Excel Engine Do?• Create new workbooks.• Create a new worksheet within a named range, write data to that range.• Write data to

Seite 58

61What Can The LIBNAME Excel Engine Not Do?• Rename worksheets in a workbook.• Delete worksheets or workbooks.• Change or apply formatting.• Delete ce

Seite 59

62Can Libname Write to a Worksheet?Libname can write to a worksheet. Example:• Write out a worksheet named “test”.• SAS will create a named range call

Seite 60

63Can LIBNAME Overwrite an Existing Worksheet?If the program is run again it would fail as the worksheet exists.We can precede it with a delete statem

Seite 61

64Can PROC SQL Write to a Worksheet?PROC SQL writes to a worksheet via CREATE TABLE. options noxwait;x 'del c:\temp\test.xls' noxwait;libnam

Seite 62 - Example:

65Can Base SAS Read Excel Data? • SAS can also read data from Excel with a variety of methods.• Many almost identical (but opposite) techniques as alr

Seite 63

66Can We Copy and Paste to SAS DATALINES? • COPY and Paste is about as simple as it gets.• You can copy cells from Excel, paste after a DATALINES stat

Seite 64

67Can We See An Example? In Excel highlight the desired cells and issue the edit copy command (Ctrl C).Choosing the Right Tool from Your SAS®and Micro

Seite 65

68And The Paste Command in SAS data softsale;input Name $ Division $ Years Sales Expense State $;datalines;BENJAMIN S 3 201.11 25.21 ILJENNIFER S 1 5

Seite 66

69Can The DATA Step Read Directly From the Clipboard?The FILENAME CLIPBRD access reads directly from the Windows Clipboard (we can skip the paste step

Seite 67 - Can We See An Example?

7Sending SAS to Excel• Excel is de-facto report distribution system.• Can contain reports, graphs, and other SAS results in a familiar format. • Can

Seite 68 - JENNIFER S 1 542.11 134.24 IL

70Can Excel Create a CSV File?EXCEL‟s File Save As, choosing a file type of CSV. Name,Division,Years,Sales,Expense,StateBENJAMIN,S,3,201.11,25.21,ILJ

Seite 69

71Can SAS Read the CSV File? • The DSD INFILE option separates at the commas. • FIRSTOBS= option can ignore the header line.data softsale;infile &apo

Seite 70 - Can Excel Create a CSV File?

72Can DDE And XML Read EXCEL DATA Within SAS? • DDE is supported for reading data in the DATA step.• It is very similar to what was shown earlier.• A

Seite 71 - Can SAS Read the CSV File?

73What Are Reading Options with SAS/ACCESS?Reading Excel becomes much easier.• Import wizards• PROC IMPORT• LIBNAME • Even PROC SQL pass-through to re

Seite 72

74How Do PROC IMPORT Wizards Work?Wizards convert Excel to SAS and are very similar to those shown earlier. To start the process, use the File Impor

Seite 73 - • LIBNAME

75How Do You Specify Excel as Input?You can select an import type of Excel and press Next.Choosing the Right Tool from Your SAS®and Microsoft Excel®To

Seite 74

76How Do We Name the Input Workbook?You can then fill in the workbook name, or browse to find it, press OK.Choosing the Right Tool from Your SAS®and M

Seite 75

77Can I Specify a Worksheet?Choose the sheet you would like to import from those shown.Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool

Seite 76

78Where Do We Name Our OUTPUT?Choose a library and type in a member name.Choosing the Right Tool from Your SAS®and Microsoft Excel®Tool Belt

Seite 77 - Can I Specify a Worksheet?

79Can the Generated Code Be Captured?You can capture the generated SAS PROC IMPORT for rerun, then Finish.Choosing the Right Tool from Your SAS®and Mi

Seite 78 - Where Do We Name Our OUTPUT?

8Some Questions about SAS and Excel• Are the structures similar?• How to transfer from SAS files to Excel and vice versa?• Are there formatting differ

Seite 79

80What Does the SAS Code Look Like?The PROC IMPORT can be altered and re-run at any time.PROC IMPORT OUT= WORK.SOFTSALE DATAFILE= "c:\temp\test.x

Seite 80 - DBMS=EXCEL REPLACE;

81Can We Read Excel Worksheets With Libname?• LIBNAME makes the workbook appear as a SAS library, and each “named range” appears as a table. • This is

Seite 81

82Do We Need to Set Up Named Ranges?You can, or use the ones SAS sets up.• LIBNAME automatically sets up range name (Sheet + $). • Can verify that wit

Seite 82

83How Do I Refer To The Table Name In SAS?• Use the name ranges as you would with any SAS dataset.• Because of the $ in the name enclose it in quotes,

Seite 83

84Can PROC SQL PASS-THROUGH Read Excel?• PROC SQL Pass-Through accesses Excel tables via sub-query.• Probably easiest when using Excel named ranges.

Seite 84

85Can I Export Excel Data From Enterprise Guide?• Exporting data from EG to Excel is very simple!• Go to your process flow, right click on the dataset

Seite 85

86Is There An Easy Way to Import Excel Into EG?• On the File menu, select Open → Data.• Select Local Computer or SAS Servers. • Navigate to the locati

Seite 86 - • Click Open

87Can I Control the Import Settings in EG? • Select View the file as is to open the entire table and use default column headings, data types and forma

Seite 87

88What Are the Different Options?The Import Data Wizard allows you to choose:• Rows and columns to import.• The row to use for column headings.• Names

Seite 88 - • Rows and columns to import

Can I Import a Specific Region From Excel?• On the Selection Pane of the Import Data Wizard , highlight Region to Import.• Change Region to Import opt

Seite 89

9What Are SAS Capabilities?A Small Subset:• SAS is excellent for analytics after data has been captured. • SAS is somewhat batch oriented.• SAS may r

Seite 90 - What Are the Region Options?

What Are the Region Options?These options are available:• Choose a line to use as column headers.• Choose the starting line.• Choose the ending line.9

Seite 91

What About Setting Column Properties in EG?• On the Selection Pane, highlight Column Options.• On the Columns list, highlight the name of a column.• I

Seite 92

What Column Properties Can I Change?• Name: name of the variable. SAS naming restrictions apply.• Label: text that is sometimes displayed in place of

Seite 93 - Microsoft Office

93What Is The SAS Add-In for Microsoft Office?• Part of SAS‟s comprehensive Enterprise Intelligence Platform.• Allows business users SAS capabilities

Seite 94

94What Can We Do With the SAS Add-In?Access Data• Utilize enterprise data from within MS Office.• Your SAS data sources. • Data sources on server (inc

Seite 95

95Can It Do Analysis and Reporting?• Analyze the data and return results back to Excel.• Programs or “SAS Stored Processes” execute SAS analytics and

Seite 96 - Conclusions

96Conclusions• SAS provides a variety of tools to both read and write Excel.• Available products, source data, output requirements, data storage lim

Seite 97

97References and AcknowledgmentsREFERENCES • “More Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS”, DelGobbo

Seite 98 - Director of Operations

98Contact UsSAS®Training, Consulting, & Help Desk ServicesSteven [email protected] Yarmouth Greenway Drive • Madison, WI 5

Kommentare zu diesen Handbüchern

Keine Kommentare