# Extract data from a published google spreadsheet

**URL:** <https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915>\
**Category:** Snippet Exchange\
**Created:** [October 12, 2021, 11:54am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915 "2021-10-12T11:54:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cedric\_Debono\_Blaze](https://community.blaze.today/user_avatar/community.blaze.today/cedric_debono_blaze/32/1672_2.png) [@Cedric\_Debono\_Blaze](https://community.blaze.today/u/Cedric_Debono_Blaze)\
**Post date:** [October 12, 2021, 11:54am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/1 "2021-10-12T11:54:44Z")

</div>

Extract data from a published google spreadsheet and use the values in the first column in a dropdown menu to look up the other values in the row.

{note}  
This is the original spreadsheet:

> **[public testing - DO NOT DELETE](https://docs.google.com/spreadsheets/d/1XRXbi-zHIMD3Mg787Um5Pf_3koox6_66VS8OB6XIfHM/edit?usp=sharing)**
>
> This Sheet is private

{urlload: [https://docs.google.com/spreadsheets/d/e/2PACX-1vRg1Cge8IQ6FgknYMrU6ZRRL42JLsHWwNsX5BYWM-r2PnfaN7utkbf\_O-VYO9lUpJa0UvNmS8gYaLfi/pub?output=csv](https://docs.google.com/spreadsheets/d/e/2PACX-1vRg1Cge8IQ6FgknYMrU6ZRRL42JLsHWwNsX5BYWM-r2PnfaN7utkbf_O-VYO9lUpJa0UvNmS8gYaLfi/pub?output=csv); done=(res) -\> ["csv"=res]}  
{endnote: trim=right}  
{if: iserror(csv)}Loading{else}{rows=slice(map(split(csv, "\n"), row -\> split(row, ",")), 2); trim=right}

Col 1 value: {formmenu: values={=rows}; itemformatter=(row) -\> row[1]; name=col}  
Col 2 value: {=col[2]}  
Col 3 value: {=col[3]}  
Col 4 value: {=col[4]}{endif}

* * *

# P.S. For instructions on how to publish a Google Sheet, please see this thread:

> [@Can I use a list in google sheet for a drop down menu?](https://community.blaze.today/t/can-i-use-a-list-in-google-sheet-for-a-drop-down-menu/5946/2):
>
> Hi, and welcome to the forum! slight_smile I assume you are asking about dynamically importing a list from a Google Sheet each time a snippet is used, so that the snippet will reflect the most recent contents of sheet. If so this is possible, but requires a few steps. Step 1. Publish the Sheet to Web as CSV First you'll want to publish you Google Sheet. You can do so under the "Publish to web" option under the "File" menu. Make sure to select the "Comma-separated values" setting. …

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://community.blaze.today/user_avatar/community.blaze.today/pratik_shah/32/3339_2.png) [@Pratik\_Shah](https://community.blaze.today/u/Pratik_Shah)\
**Post date:** [November 11, 2021, 11:00am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/2 "2021-11-11T11:00:03Z")

</div>

Hi,

I am really interested to know about this. I am trying your snippet but it does not load any data.

 ![image](https://community.blaze.today/uploads/default/original/2X/4/4acd60761ae6f359b4f93f8995584df03cdff420.png)

Am I doing it wrong?

Also, can I directly extract data from Airtable base and can use the values in snippets any different places?

---

<div class="post-metadata">

**Author:** ![Cedric\_Debono\_Blaze](https://community.blaze.today/user_avatar/community.blaze.today/cedric_debono_blaze/32/1672_2.png) [@Cedric\_Debono\_Blaze](https://community.blaze.today/u/Cedric_Debono_Blaze)\
**Post date:** [November 11, 2021, 11:11am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/3 "2021-11-11T11:11:03Z")

</div>

Hi @Pratik_Shah,

1. Click on the folder where you've saved the snippet.
2. Click on "Configure" (see image below)  
 ![image](https://community.blaze.today/uploads/default/original/2X/3/3f12984e0c0e37623c9221e6645778adeb60cb4f.png)
3. Enable the connection to "Google Sheets"

That should make the snippet functional 🙂

You can read more about connected snippets here:

> **[Connected Snippets Overview](https://blaze.today/connected/)**
>
> Connected Snippets allow you to connect your different web applications using Text Blaze snippets.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://community.blaze.today/user_avatar/community.blaze.today/pratik_shah/32/3339_2.png) [@Pratik\_Shah](https://community.blaze.today/u/Pratik_Shah)\
**Post date:** [November 11, 2021, 12:17pm UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/4 "2021-11-11T12:17:56Z")

</div>

Can you help me get this thing work?  
This is [my airtable sheet](https://airtable.com/shrsdM1JtxCrunBOh) having dummy data. I want to automatically extract these data once I write snippet.

I want drop down with list of "Company Name" i.e. with first column. and based on selection, relevant details of selected company shall be used in snippets.

Is this possible?

---

<div class="post-metadata">

**Author:** ![Gaurang\_Tandon](https://community.blaze.today/user_avatar/community.blaze.today/gaurang_tandon/32/3796_2.png) [@Gaurang\_Tandon](https://community.blaze.today/u/Gaurang_Tandon)\
**Post date:** [November 12, 2021, 9:12am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/5 "2021-11-12T09:12:00Z")

</div>

Hey Pratik, I think this snippet does exactly what you mention:

> [@Copy of Snippet "Airtable record lister"](https://community.blaze.today/t/copy-of-snippet-airtable-record-lister/11781):
>
> UPDATE: Check out our new lightweight spreadsheet ["Data Blaze"](https://community.blaze.today/t/request-for-feedback-data-blaze-beta/22784). You can easily write to and read data from Data Blaze into your existing snippets. We support one-click import of Airtable data into Data Blaze. Check out [this guide to get started](https://blaze.today/datablaze/docs/quickstart/). Grab all record IDs from an airtable base and then select from one of them using a formmenu. This snippet makes a list of all records from a single table in an Airtable base. It is recommended to look at the [original snippet](https://community.blaze.today/t/copy-of-snippet-airtable-data-extracter/11615) for better understanding …

You will need to change the property names but the rest should work as is. Please do experiment with it 🙂

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://community.blaze.today/user_avatar/community.blaze.today/pratik_shah/32/3339_2.png) [@Pratik\_Shah](https://community.blaze.today/u/Pratik_Shah)\
**Post date:** [November 12, 2021, 9:40am UTC](https://community.blaze.today/t/extract-data-from-a-published-google-spreadsheet/11915/6 "2021-11-12T09:40:18Z")

</div>

Thank you Gaurang. I will play with it.
