How to Download a Sheet as a CSV with a URL only

About this Tutorial

So you want to download a Google Sheet as a CSV. Let's do it!

Video Transcript

0:00 All right. So you want to download a Google Sheet as a CSV. Now, sometimes we want to do this for someone like we have some data in a sheet and we want to add this like button or a URL that says, download a CSV and Hey, let's check out what it does when we click that link, it's going to load up a tab, but it's
0:19 going to quickly close it. And then down here and we download it a CSV, um, that CSV, if you open it, let's see if we open it.
0:29 Okay. So I opened the CSV and see that it didn't, it doesn't have the downloaded data, uh, button that I added and I'll show you how to do that.
0:37 So, first off we have the data here, probably got the data from somewhere. Um, but in this case, I just put it on another sheet.
0:47 Um, you can do this with formulas. You can do this manually, but see, on this sheet, I don't have that button that says download data.
0:55 So what I, how I did this two steps first, I took the URL and I added, yeah, we can see it here.
1:04 Export a question. Mark format equals CSV. So that's the first step. So first step is just take the base URL.
1:11 Had this CSV export. The second step is on this download tab. Let's look at this URL over here on the right.
1:23 It says Gid equals 2, 0, 6, 4, right? And then some other numbers. So what I did on the URL, we can look at this again, is I added an and a and percent Gid equals 2 0 6, 4, and blah, blah, blah.
1:43 Right? So this URL is three parts. One is the main sheet URL. Then we did slash Export question. Mark format Equals CSV.
1:57 You can also put in PDF here. That's a little Easter egg for you. Then the third part is we did ampersand and then Gid equals.
2:07 And then we found the Gid of the Tab we wanted to export. So show you this as well, just in case you want to see.
2:18 So we figured out how to do this. Now this can be broken down as well. If you just want to supply this data, you can create a one tab sheet And then only use You don't need the Gid.
2:33 You can just do the URL and CSV. And let me show you essentially what that looks like. So if we just type in that without the Gid, We will get just the first page.
2:47 Okay. So that's, if you do not use The Gid, if you don't say, Hey, I want to only get this one download.
2:56 Um, if you do access this sheet, I create a little, um, Uh, sort of calculator here or, um, Modifier our, so you just put your sheet, your own, this ads, um, Slash export question, mark format equals CSV for you.
3:15 Um, and that's it. So what's really cool. Let me show you just because you might want to see what happens if a new PDF excused, this entire URL.
3:29 And the only thing we're going to change is the format from CSV to PDF. But you want to see what that looks like, and that is literally a PDF And there's the same data.
3:41 Uh, it's going to be the same data. It's just in a PDF format. And I think that's a really cool little extra tool feature that we can use, um, to add this link sort of in here, like, right, we can say, Hey, this data is what you want.
3:57 So download this data. We can bring this data in any way you want, um, just have it on another sheet to make it a little nicer when they download it.
4:05 Um, and then this link, we'll just link to that other sheet. Hopefully this was useful for you. And if you find any other uses for this, um, let me know, happy to share, um, and promote whatever you're working on with others.
4:19 It's a really interesting use case.