Tasks ~ Get External Data
This section contains practical tasks with step-by-step instructions. You should complete the tasks in order.
Task 1 ~ Get data from a text file
In this task you will get data from a text file.
The Import Text File dialog box is displayed.
The Text Import Wizard is started.
In Step 1, you can choose to split the text using a delimiter (a particular character), or using fixed width (a particular number of characters).
The Preview box shows the content of the data file.
Step 2 of the wizard is displayed. You can choose the delimiter character to create the split. In this case, there are two; a comma and a semi-colon.
As you make changes, you can see the results in the Data preview area.
Step 3 of the wizard is displayed.
In step 3, you can adjust the individual columns that are being created. In this case, there is no need to change anything.
The Import Data dialog box is displayed.
The data is imported into the Excel.
Task 2 ~ Get data from a Microsoft Access database
In this task you will get data from a Microsoft Access database.
The Select Data Source dialog box is displayed – this is similar to a standard Open dialog box.
The Select Table dialog box is displayed.
In this database, there is one VIEW (a query) and several tables. Here you will select a table.
The Import Data dialog box is displayed.
In this case, you will import the data into a table.
The data is imported into Excel and automatically formatted as an Excel table.
A connection to the data source will probably be established, but security settings on your computer could prevent this.
Task 3 ~ Get data from a web page
In this task you will get data from a web page. If you do not have access to the Internet, you should skip this task.
Assuming that you have access to the internet, the New Web Query dialog box is displayed, and your default home page shown.
For each individual table that Excel finds on the web page, it will show a small black and yellow arrow icon.
You should now have two tables selected.
The Import Data dialog box is displayed.
Excel will attempt to download the data from the web page. A connection to the data source will probably be established, but security settings on your computer could prevent this.
Task 4 ~ Refresh data connections
In this task you will refresh data connections.
At the moment, you should have two or three sets of imported data in your worksheet. You will refresh all the data connections. Refreshing the link to the text file requires selecting the file again. In this task, you will select a different text file which has already been updated.
Before starting the refresh process, note the data in cells B2 to D5. It contains four rows with numbers 1, 2, 3 and 5. The updated file has a row for number 4 in, so if the refresh works, you should see that row.
The Import Text File dialog box is displayed so that you can choose a text file.
The data is updated accordingly. Data from the Access and Web connections hasn’t changed, but you should see the new row for the text data.
Task 5 ~ Remove data connections
In this task you will remove all data connections.
You will remove all three data connections – or just two data connections if you were unable to connect to the internet.
The Workbook Connections dialog box is displayed.
You are asked to confirm the removal.
Excel will close the connections.
The data that you imported is no longer connected to its source files.
Finishing off
You have now completed the tasks in this section.