Microsoft' Excel & Access Integration



Similar documents
DESKTOP PRODUCTIVITY SOFTWARE

Microsoft Office Series

Microsoft Office Word 2010: Level 1

Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets

Microsoft Courses. Microsoft Office 2007

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Course Title: Microsoft Access Basic Duration: 12 hours

Access Queries (Office 2003)

BUS Business Computer Lab Course Outline Fall Term 2015 Section 001 Wednesday, 11:30-12:45, ED531

Computer Skills: Levels of Proficiency

Training Needs Analysis

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

Introduction to Microsoft Access 2003

Create a PivotTable or PivotChart report

Word 2010: Mail Merge to with Attachments

Computer Applications (10004)

Sending a Document via Working with Graphics & Using Section Breaks, Envelopes and Labels

Moving Data Between Access and Excel

Using Excel and VBA CHANDAN SENGUPTA SECOND EDITION. WILEY John Wiley & Sons, Inc.

Sample- for evaluation purposes only! Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

How To Create A Report In Excel

Microsoft Access Basics

Beginning C# 5.0. Databases. Vidya Vrat Agarwal. Second Edition

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

3 What s New in Excel 2007

Excel Database Management Microsoft Excel 2003

Siemens Applied Automation Page 1 11/26/03 9:57 PM. Maxum ODBC 3.11

How to Excel with CUFS Part 2 Excel 2010

Microsoft Access Tutorials: Table of Contents

Microsoft Excel 2010 Pivot Tables

Microsoft Office Access 2007 which I refer to as Access throughout this book

Introduction to Microsoft Access 2007

Course Descriptions for Focused Learning Classes

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Introduction to Microsoft Access 2010

Tommy B. Harrington 104 Azalea Drive Greenville, NC

Oregon State Bar Software Standards Software Proficiency Expectations (Items in bold are to be demonstrated)

Introduction to Microsoft Access 2013

Microsoft Office 2002, 2003, 2007 and 2010 Half-Day Computer Training Descriptions and Registration Information

BIRT: A Field Guide to Reporting

Analyzing Excel Data Using Pivot Tables

Financial Data Access with SQL, Excel & VBA

Excel: Analyze PowerSchool Data

DESKTOP COMPUTER SKILLS

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

MICROSOFT EXCEL 2010 ANALYZE DATA

Desktop Computing in Skillport Finding Approved Folders and Printing Certificates of Completion

Reduced Quality Sample

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Fig. 1 Suitable data for a Crosstab Query.

Microsoft Office Topics per Course

Advanced Excel 10/20/2011 1

Microsoft Access 2010 Overview of Basics

This module explains fundamental aspects of Microsoft Dynamics NAV Development Environment.

TheEducationEdge. Export Guide

Clean Up Rules Quick Steps Search Tools Change Views Export Data Convert to tasks Contact Groups. Outlook Functions

for Sage 100 ERP Business Insights Overview Document

Business Objects 4.1 Quick User Guide

Advanced Excel Charts : Tables : Pivots : Macros

Importing TSM Data into Microsoft Excel using Microsoft Query

Toad for Data Analysts, Tips n Tricks

Business Insight Report Authoring Getting Started Guide

Microsoft Access Introduction

Visual Basic. murach's TRAINING & REFERENCE

Overview What is a PivotTable? Benefits

Microsoft Office Specialist Certification Training Program

Data Tool Platform SQL Development Tools

Detail Report Excel Guide for High Schools

Query 4. Lesson Objectives 4. Review 5. Smart Query 5. Create a Smart Query 6. Create a Smart Query Definition from an Ad-hoc Query 9

Microsoft Business Contact Manager Complete

Getting Started Guide

Analyzing Data Using Excel

SENDING S WITH MAIL MERGE

By: Peter K. Mulwa MSc (UoN), PGDE (KU), BSc (KU)

FileMaker Pro and Microsoft Office Integration

Excel 2007 Tutorials - Video File Attributes

SQL SERVER SELF-SERVICE BI WITH MICROSOFT EXCEL

Kaseya 2. Quick Start Guide. for VSA 6.3

BIA and BO integration other performance management options Crystal Reports Basic: Fundamentals of Report Design

Microsoft Access 2007 Introduction

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

Lesson 9. Reports. 1. Create a Visual Report. Create a visual report. Customize a visual report. Create a visual report template.

Overview of sharing and collaborating on Excel data

Using Excel s PivotTable to Analyze Learning Assessment Data

Microsoft Office Access 2010: Intermediate. Course Overview Course Introduction. Course Length: 1 Day. Course Overview

Eskills Desktop Courses

A Basic introduction to Microsoft Access

Database Applications Microsoft Access

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Abstract. For notes detailing the changes in each release, see the MySQL for Excel Release Notes. For legal information, see the Legal Notices.

Microsoft Office 2007 Orientation Objective 1: Become acquainted with the Microsoft Office Suite 2007 Layout

Office and SharePoint

Using the Ribbon in Microsoft Office 2013 SPSCC Student Computing Center By: Bobby Coleman

Technical White Paper. Automating the Generation and Secure Distribution of Excel Reports

Excel 2003 Tutorials - Video File Attributes

SAP BUSINESS OBJECT ANALYSIS FOR EXCEL DEVELOPER GUIDE

Transcription:

Microsoft' Excel & Access Integration with Office 2007 Michael Alexander and Geoffrey Clark J1807 ; pwiueyb Wiley Publishing, Inc.

Contents About the Authors Acknowledgments Introduction Part I: Basic Integration Techniques 1 Chapter 1: Getting Excel Data into Access 3 Differences Between Access and Excel 4 Different Types of Excel Spreadsheets 4 The Excel Worksheet in Report Format 4 The Excel Worksheet in Flat File Format 5 The Excel Worksheet in Indexed List Format 6 The Access Table 8 The Table in the Datasheet View 8 The Table in the Design View 8 Different Types of Data 9 Table and Field Naming Conventions 11 Bringing Your Excel Data into Access 11 Importing a Worksheet into a New Table 11 Linking an Excel Worksheet to Access 18 Appending an Excel Worksheet to an Existing Table 22 Potential Errors When Using the Append Import Wizard 23 Summary 25 Chapter 2: Analyzing Excel Data with Access Queries 27 Introduction to Access Queries 27 Creating Your First Select Query 28 Sorting Query Results 31 Filtering Query Results 32 v xvi xvii IX

x Contents Querying Multiple Tables 33 Understanding the Concept of Relational Databases 34 Creating a Query that Joins Two Tables 35 Using Operators to Further Refine Your Queries 37 Exporting Query Results 40 Using Aggregate Queries 42 Aggregate Query Basics 42 About Aggregate Functions 44 Group By 45 Sum, Avg, Count, StDev, Var 46 Min, Max, First, Last 47 Expression, Where 47 Using Calculations in Your Analysis 50 Common Calculation Scenarios 50 Using Constants in Calculations 51 Using Fields in Calculations 51 Using the Results of Aggregation in Calculations 52 Using the Results of One Calculation as an Expression in Another 53 Performing Simple Date Calculations 53 Leveraging Access Query Wizards to Solve Common Excel Problems 55 The Find Duplicates Query Wizard 55 The Find UnMatched Query Wizard 58 Crosstab Queries 62 Summary 67 Chapter 3: Sprucing Up Excel Data with Access Reports 69 A Closer Look at the Access Report 69 Creating Your First Report 69 Viewing Your Report 71 Report View 72 Layout View 72 Design View 74 Page Footer 76 Report Footer 77 Creating and Modifying Grouped Reports 78 Grouping 78 Sorting and Totaling 80 Customizing Reports with Formatting 83 Page Layout Techniques 83 Solving Page Break Issues 83 Multi-Column Report Layout Example 84 Formatting Techniques 90 Formatting to Make Reports More Readable 91 Formatting to Highlight Specific Results 93

Contents XI Creating an Individualized Customer Letter 95 Developing the Report Data Feed 95 Initial Design of the Report 96 Adding Finishing Touches for a Professional Look 101 Summary 102 Chapter 4: Using PivotTables and PivotCharts in Access 103 Working with PivotTables in Access 103 PivotTables in Access? 104 The Anatomy of a PivotTable 105 The Totals and Detail Area 105 The Row Area 106 The Column Area 106 The Filter Area 107 Creating a Basic PivotTable 107 Creating an Advanced PivotTable with Details 111 Saving Your PivotTable 113 Sending Your Access PivotTable to Excel 114 PivotTable Options 115 Expanding and Collapsing Fields 116 Changing Field Captions 116 Sorting Data 117 Grouping Data 117 Using Date Groupings 120 Filtering for Top and Bottom Records 121 Adding a Calculated Total 122 Working with PivotCharts in Access 125 The Data Area 125 The Series Area 125 The Category Area 127 The Filter Area 127 Creating a Basic PivotChart 128 Formatting Your PivotChart 130 Summary 132 Chapter 5: Getting Access Data into Excel 135 Different Options for Importing Access Data 135 The Drag-and-Drop Method 136 Exporting the Data from Access 137 Using the Get External Data Menu 140 Using Microsoft Query 143 Introduction to Microsoft Query 143 Using the Microsoft Query Wizard 143 Starting the Query Wizard 144 Choosing and Modifying Your Data with the Query Wizard 145 Going Beyond the Wizard in Microsoft Query 156 Introduction to the Microsoft Query Interface 157 Using Microsoft Query to Import Data 159

Advanced Use of Microsoft Query 164 Using Joins 164 Modifying SQL to Create Custom Fields 167 A Very Brief Primer on SQL 167 Creating the Field 167 Adding User Defined Parameters in Microsoft Query 170 A Simple User-Defined Parameter 171 Advanced Example of User-Defined Parameter 172 Limitations of Microsoft Query 178 The Microsoft Query Wizard 178 Microsoft Query 178 Summary 179 Chapter 6: Leveraging Macros in Excel and Access 181 What Is a Macro? 181 A General Definition 181 Why Use a Macro? 182 Creating User Friendly Interfaces 182 Automating Repetitive Tasks 183 Formatting Cell Ranges 183 Comparing Macros in Excel and Access 183 Creating Macros in Microsoft Excel 184 Creating Macros in Microsoft Access 184 Introducing Excel Macros 184 Using the Macro Recorder 185 The Macro Recorder User Interface 185 Recording Macros with Absolute References 188 Recording Macros with Relative References 190 Macro Security in Excel 2007 193 Default Excel Security Settings 193 The Office Trust Center 194 Macro-Disabled Excel File Extensions 196 Excel Macro Examples 197 Macro for Navigating a Spreadsheet 197 Macro for Formatting 203 Macros in Microsoft Access 206 Macro Security in Access 2007 207 Creating your First Access Macro 209 The Macro Design Template 210 Common Actions in Access Macros 211 Access Macro Example 217 Summary 223

Part II: Advanced Integration Techniques 225 Chapter 7: VBA Fundamentals 227 What Is VBA? 228 VBA as an Object-Oriented Programming Language 229 Objects and Collections 229 Properties, Methods, and Arguments 230 Extended Analogy of the Object Model 231 The Visual Basic Editor or VBE 232 Project Explorer Window 234 Code Window 234 Code and Events 234 Variables 236 Object Variables 236 Array Variables 237 Constants 237 Declaring Variables 237 Variable Scope 238 Procedures and Functions 238 Procedures 239 Functions 242 VBA Coding Fundamentals 243 Code that Manipulates Objects 244 With...End With Construct 244 For Each-Next Construct 245 Code that Controls Execution 245 For...Next Construct 245 Do Until...Loop Construct 246 Looping Code: Do...While Loop Construct 247 Logical Code: If...Then and If...Then...Else...End If Constructs 248 Logical Code: Select Case Construct 249 Getting Help with VBA 250 Summary 252 Chapter 8: Using VBA to Move Data Between Excel and Access 255 Understanding ADO Fundamentals 256 The Connection String 256 Declaring a Recordset 258 Return Read Only Data from a Table or Query 259 Return Updateable Data from a Table or Query 260 Writing Your First ADO Procedure 260 Referencing the ADO Object Library 260 Writing the Code 262 Using the Code 264

xiv Contents Understanding SQL Fundamentals 265 Basic SQL Syntax to Select Data 265 The SELECT Statement 265 Selecting All Columns 266 The WHERE Clause 266 Expanding Your Search with the Like Operator 267 Grouping and Aggregating with the GROUP BY Clause 268 The HAVING Clause 268 Creating Aliases with the AS Clause 269 Setting Sort Order with the ORDER BY Clause 269 SELECT TOP and SELECT TOP PERCENT 270 Writing Your First ADO/SQL Data Extract 270 Using Criteria in Your SQL Statements 272 Set Numeric Criteria 272 Set Textual Criteria 272 Set Date Criteria 273 Set Multiple Criteria 273 Using the LIKE Operator 273 Common Scenarios Where VBA Can Help 275 Query Data from an Excel Workbook 275 Append Records to an Existing Excel Table 278 Append Excel Records to an Existing Access Table 280 Querying Text Files 282 Summary 283 Chapter 9: Exploring Excel and Access Automation 285 Understanding the Concept of Binding 285 Early Binding 286 Late Binding 286 Automating Excel from Access 287 Creating Your First Excel Automation Procedure 287 Automating Data Export to Excel 290 Sending One Recordset to Excel 290 Sending Two Datasets to Two Different Tabs in the Same Workbook 292 Automating Excel Reports: Without Programming Excel 293 Using Find and Replace to Adjust Macro-Generated Code 300 Running an Excel Macro from Access 301 Optimizing Macro-Generated Code 303 Removing Navigation Actions 303 Deleting Code That Specifies Default Settings 304 Cleaning Up Double Takes and Mistakes 305 Temporarily Disabling Screen Updating 306 Automating Access from Excel 306 Setting the Required References 307 Running an Access Query from Excel 307

Contents xv Running Access Parameter Queries from Excel 309 Running an Access Macro from Excel 314 Opening an Access Report from Excel 315 Opening an Access Form from Excel 315 Compacting an Access Database from Excel 316 Summary 319 Chapter 10: Integrating Excel and Access with XML 321 Why XML? 321 Understanding XML 322 The XML Declaration 322 Processing Instructions 323 Comments 323 Elements 323 The Root Element 324 Attributes 325 Namespaces 326 Creating a Simple Reporting Solution with XML 327 Exporting XML Data from Access 327 Utilizing XML Data in Excel 330 Creating a Data Entry Process Using XML 332 Creating the Data Entry Schema in Access 332 Setting Up the Data Entry Form in Excel 334 Exporting Results from Excel to XML 335 Getting the Results Back into Access 336 Summary 338 Chapter 11: Integrating Excel and Other Office Applications 339 Integrating Excel with Microsoft Word 339 Creating a Dynamic Link to an Excel Table 340 Getting Excel Data to a Word Document Using Automation 344 Creating a Word Mail Merge Document 346 Simulating the Word Mail Merge Function from Excel 351 Integrating Excel with PowerPoint 354 Creating a PowerPoint Slide with a Title 355 Copying a Range of Cells to a Presentation 357 Sending All Excel Charts to the Presentation 359 Converting a Workbook into a PowerPoint Presentation 361 Integrating Excel and Outlook 364 Mailing the Active Workbook 364 Mailing a Specific Range 366 Mailing to All E-mail Addresses in Your Contact List 367 Saving All Attachments in a Folder 369 Saving Certain Attachments to a Folder 371 Summary 373 Index 375