For this project, you get data from an XML file and from an Access database. You transform each dataset before loading the data into an Excel workbook.
Files Needed: XML_PerfectRentals-10.xml, XML_PerfectRentals-10.xsd (XMLPerfectRentals-10.zip), and Database-10.accdb (Student data files are available in the Library of your SIMnet account.)
Completed Project File Name: [your initials] PP E10-1.xlsx
- Open a new workbook and save it as [your initials] PP E10-1.
- Get data from an XML file.
- Click the Get Data button [Data tab, Get & Transform Data group], choose From File, and From XML.
- Navigate to the folder with the XML_PerfectRentals-10.xml file from your student data files. You may not see the file name extension in the Import Data dialog box. The XML_PerfectRentals-10.xsd file is a support file in the same folder, but you will not see its name.
- Select the file name XML_PerfectRentals-10.xml, click Import, and then click Transform Data. (Click Refresh in the message bar if it displays.)
- Click the Expand/Aggregate button next to the tblRentalActivity label at the top of the first column in the Power Query Editor.
- Verify that the Expand button is selected, that all field boxes are selected, and click OK.
- Remove columns in Power Query. (If you make an error, delete the step in the Query Settings pane and try again.)
- Scroll the window to the right to see the http://www.w3.org… column, the fifth column. Each row displays “Table.”
- Click the column heading to select the column.
- Press Ctrl and click the Attribute:generated column, the sixth column. These two columns are identifiers from the companion XSD file; they are not necessary for your work.
- Click the Remove Columns button [Home tab, Manage Columns group]. Both columns are removed.
- Rename columns in Power Query.
- Click the tblRentalActivity.ID column header, the first column.
- Click the Transform tab and click the Rename button [Any Column group].
- Type ID as the heading and press Enter.
- Point to the tblRentalActivity_…Rental… column header, the second column, and double-click to select the label.
- Type Rental Name as the heading and press Enter.
- Edit the remaining column headers to display the labels shown here.Start Date# of Days
- Change the data type in Power Query.
- Click the ID column header.
- Press Ctrl and click the # of Days column header.
- Click the Data Type button [Home tab, Transform group] and choose Whole Number.
- Click the Start Date header and change the data type to Date/Time.
- Select the first cell in the ID column. The calculations area may open above the Status bar. (Figure 10-12).
- Load data to a workbook.
- Click the Close & Load button [Home tab, Close group].
- Rename the sheet as XML Query if necessary. (Enterprise Excel versions may display a default sheet name.)
- Get data from an Access database file.
- Click the Get Data button [Data tab, Get & Transform Data group] and choose From Database.
- Choose From Microsoft Access Database.
- Navigate to the folder with the Database-10 file from your student data files.
- Select the Database-10 name and click Import.
- Select tblProperties in the Navigator window and click Transform Data. (Click Refresh in the Power Query window if a message bar opens about the age of the file.)
- Click the ID column.
- Change the data type to Whole Number. This field will establish a relationship between the tables in the next project.
- Load data from an Access database file.
- Click the Close & Load button [Home tab, Close group]. The data loads to a new worksheet.
- Rename the sheet as Database Query.
- Save and close the workbook (Figure 10-13).
Do you need help with this assignment or any other? We got you! Place your order and leave the rest to our experts.
