Hey, so the question is how to save a Google sheet as a csv. Now this is not so simple as file download. Let's see here. File download. csv. It's not as simple. So suppose you have a Google sheet and you want to share a link. So the question actually is the Google sheet is supposed to be a CSV file, a CSV Google sheet when shared the link.
It can be downloaded as a csv, but you want the Google sheet itself to be a CSV file sheet. So this is. Is tricky, but actually pretty darn fun when we get to it. So again, if we have access to a Google sheet we can do this, we can do file, download, CSV file. But if we are sharing this sheet and we want the recipient to get a CSV file we're gonna need to have this pretty interesting url.
This URL with the last part, G V I Z slash tq. Question mark tq Z equals. Colon csv. See that CSV at the end? That's very important. What this URL does is it allows us to share this sheet and the person getting the link immediately gets a downloaded CSV file. There's a couple of issues with this though.
Here I'll show you. So I what? First, I'll show you how it works. So I have concatenated all this together. The first part of the URL is a normal doc, docs.google.com/spreadsheet/d. That's at the beginning. You can see this Google Doc has that at the beginning. Then the ID is this part, this ID part here, right here, this big long, this every sheet has this unique identifier, and then we add this to the end.
So all this link is doing is concatenating. See this? It's just putting all four of these things together. I'll get to this one. This is really cool if you want to add it, that you only share one sheet and that sheet in particular gets downloaded as CSU file upon clicking. So here, this is what, I'll show you how it works.
I click on this link and all I get, if you notice that, all I get is this data dot csv, I'll open it and we'll see what it has. So it's literally all it has is the data. So it actually collapsed any, any any time you don't have any data in. And now Roe it, it, it gets rid of it cuz it's only com separated values, right?
So it's interesting, it has no formatting whatsoever. It literally just has the, the data that you have in there. And it's all of the values com separated by commas. That's it. Okay, so one second something. Okay. That was a empty Coke bottle that was going to fly across the room cuz it's windy here. So that was click here to download as a c.
But now we want to just get one sheet so we can put in sheet two Here we have right here, sheet two. We have this data, we have it in a, a format that's gonna be nice for a CSV file. And now this url, let's go here. I'll show you one pitfall that's gonna happen is, It's going to be saved as data dot csv, and so it'll just add that that, that parenthesis one to it.
But let's open it up. Let's see what it looks like. I'm just opening numbers. And this is the data. This is literally the data I had in that other sheet and it's downloaded. So let's check out if this URL works for someone who doesn't have access to this sheet. So I'm going to click here. I'm going to copy.
Link, I'm gonna do com, shift command new N for a. I'm in an incognito tab, so I don't have access to that sheet, right? And so I'm just gonna, there, there it is. I downloaded it right there. That is exactly the same thing. So now I can share this URL with someone and be like, here's a CSD file of it. I don't have to send them the file.
I don't have like, literally all I have to do is send that text in the URL fashion and they can download it as a csv. That's pretty darn. So if you are a better Sheets member, you are more than welcome to take a look at this sheet. I'm sharing you the sheet. You can make a copy of it and all it does is you fill in these things.
Actually, you don't even have to fill in this first part. You just fill in this ID here, and then if this Rowe is, sorry, Roe column, if this column is, is Blank. Oh my God. I'm, I'm blanked on the word blank. If this is blank, then this will change to just this Gs out colon csv. If it has something here, if it's not blank sheet two, what it does is it adds this and sheet equals, and so this concatenation.
Will conaty correctly if it, if this column is blank or if it is not. So you are more than welcome to not do that if you want, but you are more than welcome to take the sheet, use it create csv file links and share them with people. I think, let me double check if this is shared publicly. This is, anyone on the internet with this link can view it.
That might be an issue if you are trying to share it. Let me double check. Let's restrict it. Only people added can open it. Okay, let's see. Now if this link works in an incognito tab, right? So we're gonna copy it. We're going to open an incognito tab and we are going to download it. there. So even so if your we want that English.
If your sheet is not available for everyone, then this link is still protected and Google allows you to not let people in unless they're logged in. So that's really, really helpful. So you really need to make sure that your file or your sheet is change to anyone with a link and just let them view it and.
And now let's do that again. Let's do, I'm not changing anything there. So it, it, it downloaded the data file exactly as I wanted to with the link. As long as it's open, viewable to anyone. This, if you are unfamiliar, I think I have at least one other video. Maybe I included in two other videos. This is very similar to copy.
So if I took this let's do. If I took this URL and all I did was at the end, instead of edit, I put copy. This creates a language that it says copy. Oh, I actually have to be so for, in this case, I have to be logged in because what it's doing is adding that slash copy at the end. It's leading the edit, makes it immediately show up a, a, a dialogue that says, make a copy.
So I don't even get access to the file itself. I have to make a copy, so that's really, really helpful. I still, actually still have access to the document, but that link makes someone copy. right away. So that's really helpful. And this goes, this is just one more thing beyond it. Instead of letting them copy, instead of having them access the file, it just gives them a CSE file right away.
So hopefully this is really helpful in certain situations. And if you find a situation in which this is super useful or helpful, let me know. Comment, if you have access to the, the one video. If you're anywhere else, just email me and I'm happy to hear out. Really cool use cases for downloading your your link as a csv.