Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Excel 2013 ®® Tutorial 11: Connecting to External Data.

Similar presentations


Presentation on theme: "Microsoft Excel 2013 ®® Tutorial 11: Connecting to External Data."— Presentation transcript:

1 Microsoft Excel 2013 ®® Tutorial 11: Connecting to External Data

2 XP New Perspectives on Microsoft Excel 20132 Objectives Import data from a text file Work with connections and external data ranges Define a trusted location Understand databases and queries Use the Query Wizard to import data from several tables Edit a query

3 XP New Perspectives on Microsoft Excel 20133 Objectives Import tables from Access for use with a PivotTable Manage table relationships with PowerPivot Create a Web query Retrieve financial data using an Office app Access data from an XML document Work with XML data maps

4 XP New Perspectives on Microsoft Excel 20134 Visual Overview: Retrieving Text Data

5 XP New Perspectives on Microsoft Excel 20135 Visual Overview: Retrieving Text Data

6 XP New Perspectives on Microsoft Excel 20136 Exploring External Data Sources Data that is stored in locations other than the Excel workbook are known as data sources Data source files can be stored in a variety of formats, for example: – Historical data, long-term trends (text files) – Current trend information (databases) – Up-to-the-minute data (the Internet)

7 XP New Perspectives on Microsoft Excel 20137 Exploring External Data Sources

8 XP New Perspectives on Microsoft Excel 20138 Importing Data from Text Files Text files – Simple, widely used format for storing raw, unformatted data (text and numbers) – Useful for sharing data across software programs and computer systems Understanding Text File Formats – Use a delimiter (space, comma, or tab) to separate columns of data – Use fixed-width text file to start each column at the same location

9 XP Importing Data from Text Files New Perspectives on Microsoft Excel 20139

10 XP New Perspectives on Microsoft Excel 201310 Importing Data from Text Files Starting the Text Import Wizard – Determines if data is fixed-width or delimited format and, if delimited, what delimiter is used – Steps of Text Import Wizard On the DATA tab, click From Text in the Get External Data group In the Import Text File dialog box, select the file and click Import; the Text Import Wizard – Step 1 of 3 opens

11 XP Importing Data from Text Files New Perspectives on Microsoft Excel 201311

12 XP Importing Data from Text Files Specifying the Starting Row – Can specify the file type: Delimited – characters separate each field Fixed-width – fields are aligned in columns with spaces between each field – Can specify starting row other than first row – Indicate it data has headers – Click Next button to go to Text Import Wizard – Step 2 of 3 New Perspectives on Microsoft Excel 201312

13 XP Importing Data from Text Files New Perspectives on Microsoft Excel 201313

14 XP Importing Data from Text Files Editing Column Breaks – Text Import Wizard needs to know where each column begins and ends – The point at which one column ends and another begins is the column break Delimited format: delimiter determines column breaks Fixed-width format: wizard guesses locations of column breaks New Perspectives on Microsoft Excel 201314

15 XP New Perspectives on Microsoft Excel 201315 Importing Data from Text Files

16 XP Importing Data from Text Files Formatting and Trimming Incoming Data – In Step 3 of 3, format the data in each column – General format is applied by default – To specify a format: Select a column in the Data preview box Click the appropriate option button in the Column Data format section Indicate if a column should not be imported New Perspectives on Microsoft Excel 201316

17 XP Importing Data from Text Files New Perspectives on Microsoft Excel 201317

18 XP Importing Data from Text Files New Perspectives on Microsoft Excel 201318 Click Finish to import the selected data Data can then be used to create a chart

19 XP New Perspectives on Microsoft Excel 201319 Exploring External Data Ranges and Connections When data is imported into a worksheet, it is stored within an external data range – Each external data range is given a defined name based on the data source filename – Assigned name can be edited Excel can update (refresh) data ranges and connections manually or automatically Importing data creates a connection between the workbook and the text file

20 XP Exploring External Data Ranges and Connections New Perspectives on Microsoft Excel 201320

21 XP Exploring External Data Ranges and Connections Excel supports other properties for external data ranges, which include: – Keep the contents of the external data range current by reimporting or refreshing the data – Require the user to enter a password before data is refreshed – Define whether the refreshed external data range retains or replaces the formatting and layout – Define whether Excel inserts or overwrites cells when new rows are added to the data range New Perspectives on Microsoft Excel 201321

22 XP Exploring External Data Ranges and Connections Viewing a Data Connection – A data connection is like a pipeline from a data source to one or more locations in the workbook – The same data connection can link multiple data ranges, PivotTables, or PivotCharts – When you import external content Excel establishes a connection between a data range and that data source New Perspectives on Microsoft Excel 201322

23 XP Exploring External Data Ranges and Connections Viewing a Data Connection (con’t.) – To see where a data connection is being used, you can view that connection’s properties New Perspectives on Microsoft Excel 201323

24 XP Exploring External Data Ranges and Connections Modifying Data Connection Properties – You can modify data connection properties New Perspectives on Microsoft Excel 201324

25 XP New Perspectives on Microsoft Excel 201325 Defining a Trusted Location Once a trusted location is defined, Excel will access the connection to the data source without prompting for confirmation that the connection is secure

26 XP Visual Overview: Excel Databases and Queries New Perspectives on Microsoft Excel 201326

27 XP Visual Overview: Excel Databases and Queries New Perspectives on Microsoft Excel 201327

28 XP New Perspectives on Microsoft Excel 201328 An Introduction to Databases A database is a structured collection of data Databases are commonly used as the data sources for Excel workbooks A database is divided into separate tables Each table is arranged in columns and rows; also referred to as fields and records – A field stores information about a specific characteristic of a person, place, or thing – A record is a collection of fields

29 XP An Introduction to Databases Excel can retrieve data directly from most database programs New Perspectives on Microsoft Excel 201329

30 XP An Introduction to Databases Different tables are connected through database relationships; fields common to each table are used to match records in different table A one-to-one relationship is one in which one record in a table is matched to exactly one record from a second table A one-to-many relationship is one in which one record is matched to one or more records in a second table Relational databases are ones in which tables can be joined through the use of common fields New Perspectives on Microsoft Excel 201330

31 XP An Introduction to Databases New Perspectives on Microsoft Excel 201331

32 XP New Perspectives on Microsoft Excel 201332 Retrieving Data with Microsoft Query Create a query to extract specific information from a database A query contains a set of criteria that specify what values to retrieve and in what order Queries are written in a language called SQL or Structured Query Language Microsoft Query uses a wizard containing a collection of dialog boxes that guide you through the entire query process

33 XP New Perspectives on Microsoft Excel 201333 Retrieving Data with Microsoft Query To start Microsoft Query Wizard: – Click the From Other Sources button in the Get External Data group on the DATA tab – Click From Microsoft Query

34 XP New Perspectives on Microsoft Excel 201334 Retrieving Data with Microsoft Query Connecting to a Data Source – There are several types of data sources from which you can retrieve data – You can define your own data source by clicking in the list of databases – Once connected to the data source, the Query Wizard – Choose Columns dialog box opens

35 XP Retrieving Data with Microsoft Query New Perspectives on Microsoft Excel 201335

36 XP Retrieving Data with Microsoft Query Choosing Tables and Fields – Choose table and fields to include in the query New Perspectives on Microsoft Excel 201336

37 XP Retrieving Data with Microsoft Query Filtering and Sorting Data – Determine whether to retrieve all records or to filter data to retrieve only records that satisfy particular criteria New Perspectives on Microsoft Excel 201337

38 XP Retrieving Data with Microsoft Query Filtering and Sorting Data (con’t) Specify how to sort the data by values in fields New Perspectives on Microsoft Excel 201338

39 XP Retrieving Data with Microsoft Query The Query Wizard – Finish dialog box provides three options: – Return (import) the data into the Excel workbook – Display the results of the query in Microsoft Query – Save the query to a file New Perspectives on Microsoft Excel 201339

40 XP Retrieving Data with Microsoft Query Editing a Query – Add new columns to a worksheet – Change the sort order options – Revise any filters – Edit a query by editing the definition of the connection; Query Wizard will restart – Modify the query definition as you walk through the steps of the wizard New Perspectives on Microsoft Excel 201340

41 XP Importing Data from Multiple Tables into a PivotTable Import multiple tables from a database directly into Excel without using Microsoft Query If tables are related through a common field, Excel will automatically include the relationship The entire table will be imported because the query is not defined New Perspectives on Microsoft Excel 201341

42 XP Importing Data from Multiple Tables into a PivotTable New Perspectives on Microsoft Excel 201342

43 XP Importing Data from Multiple Table Into a PivotTable To import a table: – Click the From Access button in the Get External Data group on the DATA tab – Select from the Select Data Source dialog box New Perspectives on Microsoft Excel 201343

44 XP Importing Data from Multiple Table Into a PivotTable Set up and format the PivotTable and slicer New Perspectives on Microsoft Excel 201344

45 XP Exploring the Data Model and PowerPivot The data model is a database built into Excel that provides database tools Data model database contents are immediately available to PivotTables, PivotCharts, and other Excel features The data model is constructed from different tables related by common fields Installing the PowerPivot Add-In – Interact with the data model using PowerPivot – an add-in for Excel 2013 that provides tools for performing advanced data analysis and modeling New Perspectives on Microsoft Excel 201345

46 XP Exploring the Data Model and PowerPivot Installing the PowerPivot Add-In (con’t) – With PowerPivot, you can: Apply filters to tables stored in the data model Rename tables and fields within the data model Define and manage the relationships among data tables joined by common fields Format data values that will be used in PivotTables and other Excel reports Create calculated fields based on data fields from multiple data sources Create advanced data structures and models New Perspectives on Microsoft Excel 201346

47 XP Exploring the Data Model and PowerPivot Adding a Table to the Data Model – The POWERPIVOT tab contains the commands from working with the data model – Use the Add to Data Model command to add Excel tables to the data model – PowerPivot displays the contents of the data model in a separate window from the Excel workbook window New Perspectives on Microsoft Excel 201347

48 XP Exploring the Data Model and PowerPivot New Perspectives on Microsoft Excel 201348

49 XP Exploring the Data Model and PowerPivot Viewing the Data Model – View the contents of a data model in Data view and in Diagram view – Data view shows the contents of each database table in the data model on a separate tab – Diagram view shows each table as an icon and relationships between tables are indicated by connecting arrows – To see which field joins two tables, click the arrow connecting the tables New Perspectives on Microsoft Excel 201349

50 XP Exploring the Data Model and PowerPivot New Perspectives on Microsoft Excel 201350

51 XP Exploring the Data Model and PowerPivot Managing Relationships in the Data Model – To match records of one table to that of other tables, create a relationship between tables – When creating a relationship, identify a field in each table that will be used to match records New Perspectives on Microsoft Excel 201351

52 XP Visual Overview: Web and XML Connections New Perspectives on Microsoft Excel 201352

53 XP Visual Overview: Web and XML Connections New Perspectives on Microsoft Excel 201353

54 XP Creating a Web Query To keep an Excel workbook in sync with data store on a website, create a query that retrieves data from a webpage To create this web query, you need the URL of the page you are accessing – If the file is stored on a web server, it follows the format: http://server/path/filename – If the file is stored locally, it follows the format: file:///drive:/path/filename New Perspectives on Microsoft Excel 201354

55 XP New Perspectives on Microsoft Excel 201355 Creating a Web Query To open the New Web Query dialog box, click the From Web button in the Get External Data group on the DATA tab

56 XP Creating a Web Query Formatting a Web Query – Can format text imported from the web query – Formatting is preserved when Excel refreshes data – Can also retrieve the webpage data and the styles None imports text, not formatting Rich Text Format (RTF) allows for text formatting styles but not advanced features Full HTML retrieves all simple as well as advanced HTML formatting features New Perspectives on Microsoft Excel 201356

57 XP Creating a Web Query New Perspectives on Microsoft Excel 201357

58 XP Creating a Web Query Saving a Web Query – Can save a web query to a permanent file that you share among other Office documents – The saved connection file can be loaded in any Office program New Perspectives on Microsoft Excel 201358

59 XP Retrieving Data Using Office Apps Excel can be used with Office apps, which are small, specialized programs that enhance the features of Excel, Word, PowerPoint, and other programs in the Office suite Office apps can retrieve articles from online encyclopedias, insert maps, and retrieve timely stock quotes and financial information New Perspectives on Microsoft Excel 201359

60 XP Retrieving Data Using Office Apps Inserting and Office App – Apps are downloaded from the Microsoft Office Store; most apps are free – To download and use Office apps, you need an account with Microsoft Office; the account is free, requiring only a username and password to set up New Perspectives on Microsoft Excel 201360

61 XP Retrieving Data Using Office Apps New Perspectives on Microsoft Excel 201361

62 XP Retrieving Data Using Office Apps Retrieving Stock Market Data – Use the Bing Finance app to import current stock market data into a workbook – Provides current price quotes and news on stocks New Perspectives on Microsoft Excel 201362

63 XP Retrieving Data Using Office Apps Retrieving Stock Market Data (con’t) – App shows the current price of the stock and the change in price since the market opened New Perspectives on Microsoft Excel 201363

64 XP New Perspectives on Microsoft Excel 201364 Importing Data from XML XML is a language used to create structured documents using only text Office files are saved in an XML format called the Office Open XML

65 XP New Perspectives on Microsoft Excel 201365 Importing Data from XML Each piece of data in an XMP document is contained within an element Data is marked by an opening and closing tag XML documents are structured like a tree in which elements are placed within one another, descending from a common root element The structure of the document is displayed in a data map

66 XP New Perspectives on Microsoft Excel 201366 Importing Data from XML XML author can create rules specifying: – Which elements are required – What types of values are allowed within each element Rules are stored in a second document called the schema – Not required in XML – Are useful in ensuring the integrity and validity of XML data

67 XP Importing Data from XML Editing an XML File – Before importing data, you can edit it – The first step in connecting a workbook to an XML document is to generate the data map – After Excel has generated a data map, you can use it to place XML content anywhere within the workbook New Perspectives on Microsoft Excel 201367

68 XP New Perspectives on Microsoft Excel 201368 Importing Data from XML Loading an XML Data Map – Commands to access the data map of an XML document are part of Excel Developer tools – To work with an XML data map, you must show the DEVELOPER tab on the ribbon – If the XML document has a schema file attached to it, you can load a data map without actually importing the data into the Excel workbook

69 XP New Perspectives on Microsoft Excel 201369 Importing Data from XML Binding XML Elements to a Worksheet – Using XML as a data source, allows you to attach (bind) elements to specific cells in the workbook

70 XP New Perspectives on Microsoft Excel 201370 Importing Data from XML Importing XML Data – You can import XML data directly into worksheet cells – To retrieve XML data, refresh the connection to the data source – Excel automatically places data in the correct worksheet cells – Can automatically update XML data in a workbook to reflect changes to the source XML document

71 XP New Perspectives on Microsoft Excel 201371 Importing Data from XML

72 XP New Perspectives on Microsoft Excel 201372 Using Real-Time Data Acquisition Another data source: real-time data acquisition values from measuring devices and scientific equipment Usually requires purchase of an add-in to manage communication between Excel and the measuring device Excel provides the RTD function to facilitate real-time data acquisition Can save hours of data entry time


Download ppt "Microsoft Excel 2013 ®® Tutorial 11: Connecting to External Data."

Similar presentations


Ads by Google