WEBVTT

1
00:00:02.900 --> 00:00:06.950
How can 10 tab-separated employee records
be imported without editing the source?

2
00:00:09.201 --> 00:00:15.227
Choose Data, From Text/CSV and load a copy
with a connection to the source file.

3
00:00:16.227 --> 00:00:18.970
A text file separates its
fields with a delimiter,

4
00:00:18.970 --> 00:00:21.821
for example a tab or a comma;
a CSV file uses commas.

5
00:00:21.821 --> 00:00:25.908
Open the file itself and you work
in the original, with no copy and no link.

6
00:00:25.908 --> 00:00:29.243
An import leaves the source
alone and links your table to it,

7
00:00:29.243 --> 00:00:30.857
so the table can be refreshed.

8
00:00:31.857 --> 00:00:34.674
We use the book's Employee Sickness file:

9
00:00:34.674 --> 00:00:38.295
10 employees, with department,
job code and days off.

10
00:00:40.145 --> 00:00:45.235
On the Data tab, choose From Text/CSV,
pick the file and click Import.

11
00:00:45.235 --> 00:00:50.253
The preview shows Tab as the delimiter,
with 10 rows in six columns.

12
00:00:52.103 --> 00:00:52.702
Click Load.

13
00:00:52.702 --> 00:00:55.535
The 10 employees arrive
as a table on a new sheet,

14
00:00:55.535 --> 00:00:57.605
and the text file itself is unchanged.

15
00:00:57.605 --> 00:01:00.874
The days total 42.5,
the same as the source.

16
00:01:02.874 --> 00:01:05.526
Watch out for codes such
as zero zero one seven:

17
00:01:05.526 --> 00:01:08.448
automatic type detection can
remove the leading zeros.

18
00:01:08.448 --> 00:01:09.476
In Transform Data,

19
00:01:09.476 --> 00:01:12.074
replace or remove
the earlier Changed Type step

20
00:01:12.074 --> 00:01:15.592
before setting the code column
to Text from the original values,

21
00:01:15.592 --> 00:01:18.136
then verify zero zero
one seven before loading.

22
00:01:19.136 --> 00:01:19.841
Your turn.

23
00:01:19.841 --> 00:01:24.771
Change only the source: two more
employees are added to the text file.

24
00:01:24.771 --> 00:01:28.011
What do you do so the table shows 12 rows?

25
00:01:31.961 --> 00:01:36.056
Remember: import a copy with a connection,
then refresh it when the source changes.
