1
00:00:00,180 --> 00:00:00,830
Welcome back.

2
00:00:00,840 --> 00:00:06,330
In this lesson, we're going to update our text to be a CSV file, so there's a few updates that we

3
00:00:06,330 --> 00:00:09,240
need to do and one of them is the file name.

4
00:00:09,240 --> 00:00:14,300
So changing that to CSFI so it generates a CSV file with the extension.

5
00:00:14,580 --> 00:00:15,960
Next we need to update the type.

6
00:00:16,230 --> 00:00:18,300
So currently we're just doing a plain text.

7
00:00:18,550 --> 00:00:24,480
But in this case we want to do a CSFI and we need to also specify the character set for the CSFI.

8
00:00:24,780 --> 00:00:27,050
And the character set is UTF eight.

9
00:00:27,600 --> 00:00:31,490
So now when we refresh, we download and we're downloading a CSV.

10
00:00:31,830 --> 00:00:37,410
Now that we've downloaded the CSFI, let's open that up and make sure that you're opening it as a comma

11
00:00:37,410 --> 00:00:39,840
separated because that's the structure that we created.

12
00:00:40,020 --> 00:00:42,350
You could also do a semicolon separated.

13
00:00:42,540 --> 00:00:44,490
So this is another option that you have.

14
00:00:44,970 --> 00:00:50,400
But then of course it wouldn't be CSV file, so make sure you do have comma separated, checked off.

15
00:00:50,400 --> 00:00:54,990
I'm using OpenOffice in order to open it and there's a quick preview on what it's going to look like.

16
00:00:54,990 --> 00:01:00,510
And we see the structure is exactly what we were looking for when we were coming out of our CSV file

17
00:01:00,510 --> 00:01:01,170
structure.

18
00:01:01,320 --> 00:01:04,350
So there's a few other fixes that we still need to apply.

19
00:01:04,530 --> 00:01:09,990
And one of the things that could go wrong is potentially if we already have a comma in there, we save

20
00:01:09,990 --> 00:01:15,900
it, we refresh, we download the file, and this time when we open the file, you're going to see that

21
00:01:16,170 --> 00:01:18,060
because it's comma separated out.

22
00:01:18,240 --> 00:01:23,920
There's a problem there that this wasn't supposed to be within a new column, but it did add it into

23
00:01:23,920 --> 00:01:24,380
a column.

24
00:01:24,570 --> 00:01:30,150
So we need to take care that we need to fix that with our JavaScript, doing a quick cleaning of that

25
00:01:30,150 --> 00:01:34,940
content and updating it, either removing the comma so we don't throw any of these errors.

26
00:01:35,220 --> 00:01:38,130
So it's going to be a quick fix that we're going to do in the upcoming lesson.

27
00:01:38,340 --> 00:01:43,740
So go ahead and update your code in order to download the file as a CSFI.
