# Fill column with data from a related Sheet

**URL:** <https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445>\
**Category:** Ask for Help\
**Created:** [July 28, 2022, 4:10pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445 "2022-07-28T16:10:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boris\_Eichenberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/boris_eichenberger/32/43469_2.png) [@Boris\_Eichenberger](https://community.glideapps.com/u/Boris_Eichenberger)\
**Post date:** [July 28, 2022, 4:10pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/1 "2022-07-28T16:10:23Z")

</div>

Hi  
I try to build a glideapp with an Excel-Sheet as a basis because I want to access it both from my glideapp and also with a powershell script.

I have a main table that is using the date from other tables like names and email adress. To add a new row on the main table I want to use the choice component. But then I have other columns which I want to fill with other Items from the related tables based on the selection I make for the main table. In excel I could do this with a formula that looks for the data in the other columns and gives the value back to the main column. I tried to use the “set column values” as an action when sending the form - but although the formula is visible in the table in glide, it is not in my excel-sheet.

Question:

- Why is the value that I write with the “set column values” visible in the glidetable but not in Excel? And yes, I refreshed several times.
- Is there an easier what to write data from a related table into the main table when filling a form?

thanks  
Boris

---

<div class="post-metadata">

**Author:** ![justinjmp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justinjmp/32/43205_2.png) [@justinjmp](https://community.glideapps.com/u/justinjmp)\
**Post date:** [July 28, 2022, 4:24pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/2 "2022-07-28T16:24:42Z")

</div>

I am assuming that the value that it being generated in Glide is a calculation completely in Glide? If so this will not go to Excel as Glide calculations live in data tables only.

What are you trying to write and what is the calculation? If you want to link two fields in the excel sheet itself you will need to create a formula in excel to do this. Relations and Calculations in Glide will only be visible in Glide.

---

<div class="post-metadata">

**Author:** ![Boris\_Eichenberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/boris_eichenberger/32/43469_2.png) [@Boris\_Eichenberger](https://community.glideapps.com/u/Boris_Eichenberger)\
**Post date:** [July 28, 2022, 4:30pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/3 "2022-07-28T16:30:16Z")

</div>

Thanks for helping me out.

Can I use the “set column values” in Glide to write an Excel-Formula into the table that will then be activated in Excel?

The calculation is mainly taking the values from one sheet and writing it into another sheet. And then in the main table I need to take the values from different columns to create the header and the text for an E-Mail. At the end I am happy if glide calculates this for me as long I have the value then in my excel sheet.

---

<div class="post-metadata">

**Author:** ![justinjmp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justinjmp/32/43205_2.png) [@justinjmp](https://community.glideapps.com/u/justinjmp)\
**Post date:** [July 28, 2022, 4:40pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/4 "2022-07-28T16:40:33Z")

</div>

That sounds like a great idea! I have never tried it before but testing on Google Sheets look like it can be possible if you have a helper column in excel to reformat the data … though with doing that you could just do the calculation in excel itself.

![Screen Shot 2022-07-28 at 12.38.08 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/0/60d9b647cf7cbd31c422066f5c6cc931553c87e3.png)

In Google Sheets I can see that Glide is adding in a preceding quotation mark, probably to denote that it is text.

---

<div class="post-metadata">

**Author:** ![justinjmp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justinjmp/32/43205_2.png) [@justinjmp](https://community.glideapps.com/u/justinjmp)\
**Post date:** [July 28, 2022, 4:44pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/5 "2022-07-28T16:44:41Z")

</div>

For this then, what you could do is calculate your values as you are already doing in Glide and then either use the set column action to set a text/number field in your table with the calculation. This should then send to Excel.

In a similar manner, if you are looking to get your email values into Excel to then create the email there, you could use a template column to construct the email values into a cell in Glide. From there, you can again use the set value column to set to a text column which should then sync to excel. Alternatively you could also use the Send Email action to create and send the email in Glide itself.

---

<div class="post-metadata">

**Author:** ![Boris\_Eichenberger](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/boris_eichenberger/32/43469_2.png) [@Boris\_Eichenberger](https://community.glideapps.com/u/Boris_Eichenberger)\
**Post date:** [July 28, 2022, 5:05pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/6 "2022-07-28T17:05:08Z")

</div>

yes, writing the value as a text with the set column value action works. The question is then, how do I get rid of the ’ notation that is a text in order to use the formula.

I also tried to add a column in the sheet section of glide and use the lookup-funktion. This would be the easies way. But I do not see that the columns that I create in the glideapp are transfered to the excel sheet.

---

<div class="post-metadata">

**Author:** ![justinjmp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/justinjmp/32/43205_2.png) [@justinjmp](https://community.glideapps.com/u/justinjmp)\
**Post date:** [July 28, 2022, 5:19pm UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/7 "2022-07-28T17:19:46Z")

</div>

You would need to have a helper column in excel that would clean the value for example something like this RIGHT(string , LEN(string) - 1).

Any columns that use Glide functions or calculations will not transfer to excel. This includes relations, lookups, templates, math columns, arrays, and others. If you calculated everything in Glide you would have to then transfer out the calculation using the method described earlier.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 29, 2022, 12:32am UTC](https://community.glideapps.com/t/fill-column-with-data-from-a-related-sheet/45445/8 "2022-07-29T00:32:46Z")

</div>

If it’s a formula that will be written on every row, it’s better to use arrayformula and you don’t have to worry about the formula being seen as text.

Also, I’m not sure if RIGHT and LEN solve the problem here. The original source is already a text, so you would have to have something equivalent to an “evaluate” function in JavaScript to tell Excel/Sheet that please execute that formula, not to read it as text again.

> [@Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts](https://community.glideapps.com/t/tutorial-arrayformula-in-google-sheets-good-practices-how-to-overcome-arrayformula-restrictions-with-scripts/9727):
>
> Hi, Today I will show you the script that can make copying formulas down work, when it does not work with arrayformula. But first, let’s have some introductions about arrayformula, for those who has not used this before in Google Sheets, some equivalents in Glide and some good practices while using it. I hope it can help you in building your Glide apps as well as applying it in your normal day job. 
> 
> > **1/ Definition**
> >
> > Arrayformula is defined as “a range, mathematical expression using one cell range …
