Download presentation
Presentation is loading. Please wait.
Published byRudolph Bergmann Modified over 6 years ago
1
Exploring Microsoft® Excel® 2016 Series Editor Mary Anne Poatsy
Exploring Microsoft Office 2016 Series Editor Mary Anne Poatsy Mulbery|Davidson Series Created by Dr. Robert T. Grauer
2
Copyright © 2017 Pearson Education, Inc.
Chapter 10 In Chapter 10, you will learn how to import, format, and manipulate data from external sources. Imports, XML, and Power Add-Ins Managing Data Copyright © 2017 Pearson Education, Inc.
3
Copyright © 2017 Pearson Education, Inc.
Objectives Import Data from External Sources Manage Connections Convert Text to Columns Manipulate Text with Functions Use Flash Fill The objectives for this chapter are: Import Data from External Sources Manage Connections Convert Text to Columns Manipulate Text with Functions Use Flash Fill Additional objectives are listed on the next slide. Copyright © 2017 Pearson Education, Inc.
4
Copyright © 2017 Pearson Education, Inc.
Objectives Understand XML Syntax Import XML Data into Excel Use Power Pivot Functionality Import Data with Power Query Visualize Data with Power View The objectives for this chapter are: Understand XML Syntax Import XML Data into Excel Use Power Pivot Functionality Import Data with Power Query Visualize Data with Power View Copyright © 2017 Pearson Education, Inc.
5
Objective 1: Import Data from External Sources
In this section, the skills include: Import a Text File Import an Access Database Table or Query Import Data from Other Sources Skills: Import a Text File Import an Access Database Table or Query Import Data from Other Sources Copyright © 2017 Pearson Education, Inc.
6
Import Data from External Sources
We are going to look at importing external data into an Excel workbook from text files and Access database tables. Importing is the process of inserting external data—data created or stored in another format—into the current application. When you import external data into Excel, you embed the data within the Excel worksheet. That means you can edit the data directly within Excel because there is no connection to the original data source. A text file (indicated by the .txt file extension) is a data file that contains characters, such as letters, numbers, and symbols, including punctuation and spaces. Text files contain delimiters, special characters such as a tab, space, or a comma, that separate data. A tab-delimited file uses tabs to separate data into columns. You can also import a fixed-width text file, which is a file in which each column contains a specific number of characters—5 characters for the first column, 20 for the second column, and so on—to separate the fields. The slide shows a tab-delimited file opened in Notepad on the left and the same data imported into Excel on the right. Notice the parallel organization between the two applications; each field line has become a row, and each tabbed column in the text file has become a column in the worksheet. Furthermore, the headers in the first line in the text file have become headers in the first row. Copyright © 2017 Pearson Education, Inc.
7
Import Data from External Sources
A comma-separated values (CSV) file uses commas to separate data into columns and a newline character to separate data into rows. A newline character is a special character that designates the end of a line and separates data for the next line or row. If you were using Notepad and typing the data shown on the left, what key would you press to move to a new line? The only difference between the two text files is pressing the Tab key or pressing the comma key between fields. As you can see, when imported into Excel, they look the same. Copyright © 2017 Pearson Education, Inc.
8
Import Data from External Sources
Delimited Has headers To import data from a text file into a new Excel workbook, you: Click the File tab, click Open, and click Browse. Click the File Type arrow that currently displays All Excel Files and select Text Files. Navigate to the folder that contains the text file, select it, and then click Open to display the Text Import Wizard. Text Import Wizard – Step 1: Select Delimited. Select My data has headers. Preview the import file. Preview Copyright © 2017 Pearson Education, Inc.
9
Import Data from External Sources
Tab Text Import Wizard – Step 2: Click the appropriate delimiter check box, such as Tab. Move the column break lines to where the columns begin and end, if the text file contains fixed-width columns. Preview the import file. Preview Copyright © 2017 Pearson Education, Inc.
10
Import Data from External Sources
Column data format Text Import Wizard – Step 3: Select the Column data format, which usually is General. Preview the import file and click Finish. Preview Copyright © 2017 Pearson Education, Inc.
11
Import Data from External Sources
Select Transactions Select Table To import an Access database table or query into Excel, you: Start Excel, start a new workbook or open an existing workbook, and then click the worksheet tab to which you want to import the data. On the Data tab in the Get & Transform group, click Get External Data, and click From Access in the Get External Data group to display the Select Data Source dialog box. Select the Access database file that contains data you want to import and click Open. Choose a table or query from the list in the Select Table dialog box. In our example, we will select the Transactions table. Select how you want to view the data in your workbook—in our example, as a table. Select where you want to import the data—in our example, into cell A1 of an existing worksheet. Click OK. Copyright © 2017 Pearson Education, Inc.
12
Import Data from External Sources
Because we imported the data as a table, Excel formats the data using a default Excel table style. In addition, Excel displays the filter arrows so that we can sort and filter data. Copyright © 2017 Pearson Education, Inc.
13
Import Data from External Sources
Click From Other Sources As shown in the slide, data can be imported from sources other than text files and Access databases. Click Get External Data in the Get & Transform group and click From Other Sources in the Get External Data group to display a list of additional sources. Copyright © 2017 Pearson Education, Inc.
14
Objective 2: Manage Connections
In this section, the skills include: Set Connection Properties Skills: Set Connection Properties Copyright © 2017 Pearson Education, Inc.
15
Copyright © 2017 Pearson Education, Inc.
Manage Connections When data are imported using the options in the Get External Data group, Excel creates a link to the original data source so the data can be updated quickly in Excel. After the initial connection is created, you might want to view or modify the connection. The Connections group on the Data tab contains options to manage external data connections. To display a list of all connections in a workbook: On the Data tab in the Connections group, click Connections to display the Workbook Connections dialog box. Select the connection name in the top portion of the dialog box to see where a specific connection is located. As shown in the figure on the left, this is the tab-delimited table, whose data was imported in the previous objective. Data range properties are settings that control how imported data in cells connect to their source data. To display the data range properties, click Properties. To ensure that the Excel data is current, you need to refresh the connections to the original external data source periodically. Refreshing the connection updates the linked data in an Excel workbook with the most up-to-date information. Copyright © 2017 Pearson Education, Inc.
16
Objective 3: Convert Text to Columns
In this section, the skills include: Convert Text to Columns Skills: Convert Text to Columns Copyright © 2017 Pearson Education, Inc.
17
Convert Text to Columns
Sometimes when you use someone else’s workbook or import data from external sources, data might be displayed in one column when it would be more useful if separated into two or more columns. As seen in the worksheet on the left, three fields are combined into a single column. The worksheet on the right shows that the fields are now in separate columns. To convert combined text into multiple columns: Select the column containing the text you want to separate. On the Data tab in the Data Tools group, click Text to Columns. Use the Convert Text to Columns Wizard to distribute the data. Specify the file type, such as Delimited or Fixed width, and click Next. In the Convert Text to Columns Wizard, specify the delimiters, such as a Tab or Space, and click Next. As seen in the slide, the data is delimited by spaces. Select the column data format in the Convert Text to Columns Wizard and click Finish. Copyright © 2017 Pearson Education, Inc.
18
Objective 4: Manipulate Text with Functions
In this section, the skills include: Combine Text with CONCATENATE Function Change Text Case with Text Functions Use the SUBSTITUTE Function Use Other Text Functions Skills: Combine Text with CONCATENATE Function Change Text Case with Text Functions Use the SUBSTITUTE Function Use Other Text Functions Copyright © 2017 Pearson Education, Inc.
19
Manipulate Text with Functions
Excel Text functions: CONCATENATE—individual text strings into one text string =CONCATENATE(text1,text2) PROPER—capitalizes the first letter of each word in a text string =PROPER(text) UPPER—converts text strings to uppercase letters =UPPER(text) LOWER—converts text strings to lowercase =LOWER(text) Excel has 27 functions that are specifically designed to change or manipulate text strings. On the Formulas tab in the Function Library group, click Text to display a list of text functions. Text labels are often called text strings, and text strings are not used for calculations. Some of the text functions that we will examine are: The CONCATENATE function joins two or more individual text strings into one text string. The PROPER function capitalizes the first letter of each word in a text string, including the first letter of prepositions and articles. The UPPER function converts text strings to uppercase letters. The LOWER function converts text strings to lowercase letters. Additional text functions are discussed on another slide. Copyright © 2017 Pearson Education, Inc.
20
Manipulate Text with Functions
CONCATENATE Look at the Formula Bar in the top figure, where three strings are concatenated—the contents of the cells in column C, a string consisting of the comma character, and the contents of the cells in column B. Note: The use of quotation marks around the comma. What do you think would happen if there were no quotations marks? The bottom figure shows the application of the PROPER, UPPER, and LOWER functions applied to the contents of the cells in column A. Copyright © 2017 Pearson Education, Inc.
21
Manipulate Text with Functions
Excel Text functions: SUBSTITUTE—replaces new text for old text in a text string =SUBSTITUTE(text,old_text,new_text,instance_num) LEFT—returns the specified number of characters from the start of a text string LEFT(Text,Num_chars) RIGHT—returns the specified number of characters from the end of a text string RIGHT(Text, Num_chars) To continue: The SUBSTITUTE function substitutes, or replaces, new text for old text in a text string. The LEFT(Text,Num_chars) function returns the specified number of characters from the start of a text string. The RIGHT(Text, Num_chars) function returns the specified number of characters from the end of a text string. Copyright © 2017 Pearson Education, Inc.
22
Objective 5: Use Flash Fill
In this section, the skills include: Use Flash Fill Skills: Use Flash Fill Copyright © 2017 Pearson Education, Inc.
23
Copyright © 2017 Pearson Education, Inc.
Use Flash Fill Flash Fill Flash Fill is a productivity feature that enables you to enter data in one or two cells to provide a pattern; it is used by Excel to complete the data entry. Flash Fill also has the ability to separate text into multiple columns. For example, in the worksheet shown in the slide, column A contains cities and state abbreviations. Instead of using Text to Columns, you can type the first city name in a column adjacent to the dataset and use Flash Fill to create a column of city names only. To use Flash Fill: Enter data that uses part of existing data in a column in the dataset. Press Enter and start typing the second sample data. Click Fill on the home tab and select Flash Fill. Copyright © 2017 Pearson Education, Inc.
24
Objective 6: Understand XML Syntax
In this section, the skills include: Understand XML Syntax Skills: Understand XML Syntax Copyright © 2017 Pearson Education, Inc.
25
Copyright © 2017 Pearson Education, Inc.
Understand XML Syntax <Apartment> <Bedrooms>3</Bedrooms> <Bathrooms>2</Bathrooms> <Rent>$1,000</Rent> <Telephone>(305) </Telephone> </Apartment> 3bedrooms/2bathrooms–$1,000permonth–(305) Extensible Markup Language (XML) is standard for structuring data across applications, operating systems, and hardware. It enables data to be sent and retrieved between otherwise incompatible systems. XML describes the structure of data but not the appearance or formatting. Consider the text shown on the left. To us, this is an advertisement for an apartment. Computers need a method to interpret it. Using XML, the advertisement appears on the right with tags. A tag is a user-defined marker that identifies the beginning or ending of a piece of data in an XML document. The next slide shows us an XML document that was created in Notepad. People Computers Copyright © 2017 Pearson Education, Inc.
26
Copyright © 2017 Pearson Education, Inc.
Understand XML Syntax The top few lines consist of an XML declaration and two comments, which are optional. Looking at the remaining code, we see that an object named Apartment Complex is composed of three types of apartments. Looking at each apartment object, we see that they are composed of objects—bedroom, bathroom, rent, and so on. Note the following about XML documents: An XML document is divided into elements. Each element contains a start tag, an end tag, and the associated data. XML tags are case sensitive—<Rent></Rent> is correct but <Rent></rent> is not. XML elements can be nested to any depth, but each inner element (or child) must be entirely contained within the outer element (or parent). Indenting indicates the hierarchy structure. Copyright © 2017 Pearson Education, Inc.
27
Objective 7: Import XML Data into Excel
In this section, the skills include: Import XML Data Refresh Imported XML Data Skills: Import XML Data Refresh Imported XML Data Copyright © 2017 Pearson Education, Inc.
28
Import XML Data into Excel
Link options Excel is designed to analyze and manipulate data regardless of the data source. We have already seen that data may originate within a worksheet, be imported from an Access table or query, or come from a text file. We can now add an XML document as a data source. Like a text file, an XML document can be opened directly from the Open dialog box or imported with a connection to the original document. To open an XML file: Display the Open dialog box. Click the File Type arrow and select XML Files. Select the XML file you want and click Open to display the Open XML dialog box. Select the option that describes how you want to open the file and click OK. If the Microsoft Excel message box appears stating, “The specified XML source does not refer to a schema. Excel will create a schema based on the XML source data,” click OK. If you select the As an XML table default option, Excel opens the XML file as a table with each element as a column label or field. Copyright © 2017 Pearson Education, Inc.
29
Import XML Data into Excel
XML Source pane Worksheet area If you select the Use the XML Source task pane option, Excel opens a new workbook and displays the XML Source task pane on the right side. To map XML elements to worksheet cells and import data: Drag the desired elements to the desired cells in the worksheet. Note: This does not copy the data, only the table headings. Right-click a cell in the worksheet area and point to XML. Select Import, find the XML file containing the data you want to import, and then click OK to import the actual data. You can also import XML data in a manner similar to what was done with the text and Access files. To import XML data while maintaining the connection: On the Data tab in the Get & Transform group, click Get External Data, click From Other Sources in the Get External Data group, and then select From XML Data Import. Select the XML document you want to import in the Select Data Source dialog box and click Open. Select the desired options from the Import Data dialog box and click OK. As we saw with text and Access files, data that is imported needs to be refreshed. To refresh data that is imported from XML: Click the Data tab and click Refresh All in the Connections group. Click the Data tab, click Connections, select the XML document, and click Refresh. Right-click the data table that was created from the XML document and select Refresh. Copyright © 2017 Pearson Education, Inc.
30
Objective 8: Use Power Pivot Functionality
In this section, the skills include: Load the Power Pivot Add-In Import Data with Power Pivot Create Relationships with Power Pivot Create a PivotTable with Power Pivot Skills: Load the Power Pivot Add-In Import Data with Power Pivot Create Relationships with Power Pivot Create a PivotTable with Power Pivot Copyright © 2017 Pearson Education, Inc.
31
Use Power Pivot Functionality
Power Pivot—add-in included in Excel’s standard PivotTable options Key features: Handling and compressing big data Identifying and displaying key performance indicators Ability to import data from a vast array of sources Ability to create relationships between multiple related data tables Power Pivot is a built-in add-in that offers the key functionality that is included in Excel’s standard PivotTable options, plus a variety of useful features for the power user. Key features include: Handling and compressing big data Identifying and displaying key performance indicators Ability to create relationships between multiple related data tables Ability to import data from a vast array of sources The Power Pivot add-in is only available for Office Professional Plus users. By default, it is not enabled and must be enabled before use. To enable the Power Pivot add-in, complete the following steps: Click the File tab and click Open Other Workbooks. Select Options. Select Add-Ins. Select COM Add-Ins in the Manage box and click Go. Click to select Microsoft Office Power Pivot and click OK. Copyright © 2017 Pearson Education, Inc.
32
Use Power Pivot Functionality
Primary table Related table Related name Related name As mentioned in the previous slide, Power Pivot enables you to import data from a variety of different import sources. To import data using Power Pivot: Click the Power Pivot tab. Click Manage in the Data Model group. Click Get External Data and select the desired data source. Select the file path from the Table. A key feature of Power Pivot is the ability to create relationships among multiple data sources that share common fields. For example, suppose that one table contains commodity broker names and IDs. A related table contains the sales dates, sales amounts, and the brokers’ IDs. We can create a separate dataset that includes just the broker names and related sales data. To do this, we need to pull the data from two tables using a relationship between the two tables. We use the Broker_ID to create this relationship. To create a Power Pivot relationship: On the Power Pivot tab, click Manage. Click the Design tab and click Create Relationship to display the Create Relationship dialog box. Click the Table 1 arrow and select the name of the primary table. Select the name of the column that contains a relationship to the related table in the Table 1 Columns box. Click the Table 2 arrow and select the name of the related or lookup table. Click the Table 2 Columns box and select the name of the column that is related to the primary table and click OK. To create a PivotTable using two related tables: Click the Power Pivot tab and click Manage. In the Power Pivot for Excel dialog box, click Home and then click PivotTable. Select an option to either create the PivotTable on a new worksheet or an existing worksheet and click OK. Copyright © 2017 Pearson Education, Inc.
33
Objective 9: Import Data with Power Query
In this section, the skills include: Import Data with Power Query Skills: Import Data with Power Query Copyright © 2017 Pearson Education, Inc.
34
Import Data with Power Query
Power Query is a new feature added to Excel Power Query is a business intelligence tool that provides the user with the ability to import, shape, cleanse, and query data. To import data using Power Query: On the Data tab in the Get & Transform group, click New Query. Select the desired data source. Format the import data in the Query Editor to desired criteria. Click Close & Load. New Query Close & Load Formatting options Copyright © 2017 Pearson Education, Inc.
35
Objective 10: Visualize Data with Power View
In this section, the skills include: Visualize Data with Power View Skills: Visualize Data with Power View Copyright © 2017 Pearson Education, Inc.
36
Visualize Data with Power View
Drag to the desired location on the Power View dashboard Select filters Power View is an Excel add-in that enables users to create a visual dashboard with the functionality of a PivotTable. Similar to Power Pivot and Power Query, Power View utilizes data from multiple data sources using relationships. Power Views are displayed on the Canvas, which is the area that contains the dashboard data visualizations. Visualizations are data fields and tables added to the Power View canvas. Once a Power View is created, it can be filtered to display only desired information. To create a Power View: Load the Power View add-in and add Power View to the Quick Access Toolbar. Select the data you want to summarize. Click Power View on the Quick Access Toolbar. Drag the required fields from the Power View Fields box to the desired location on the Power View dashboard. Click each field that contains data in the Power View Fields window and set the desired aggregate calculations. Add additional formatting as needed. Aggregate calculations Copyright © 2017 Pearson Education, Inc.
37
Copyright © 2017 Pearson Education, Inc.
Summary Importing data files: Text Access XML Using: Get External Data Power Pivot Power Query In this chapter, we learned how to import, format, and manipulate data from external sources. The main focus was on importing three types of data files: Structured Text files—with delimiters or fixed-width Access Files—tables or queries XML files Date files were imported using: The Get External Data command The Power Pivot add-in The new Power Query By using some of Excel’s string functions, text can be manipulated: Combining text—CONCATENATE Changing text—UPPER, LOWER, PROPER Replacing text—SUBSTITUTE Copyright © 2017 Pearson Education, Inc.
38
Copyright © 2017 Pearson Education, Inc.
Questions ? It is important to understand how to import, format, and manipulate data from external sources. Are there any questions? Copyright © 2017 Pearson Education, Inc.
39
Copyright Copyright © 2017 Pearson Education, Inc.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.