Getting Google Sheets Column Name

Hello Makers, I hope all are doing great!

I have a query regarding how to get a column name in text, as “Raw” is showing column index numbers but dispayed as text.

I want to find the column name or number Anything can work but in this case how can i find the “key” column name or number with respect to any values to search from output collection of 1 row and n columns.

As in image attached If i want to search for column name or number by searching for value 391.50. How can i get out as 26 or R2 for this value 391.50 as in output from search module of Google sheets.

Hi Prem_Patel

What do you need to do with the result? What is the next module you need use it?

2 Likes

Welcome to the Make community!

Please provide the output bundles of the trigger module by running the scenario, then click the bubble on the top-right of the module, save the contents as a bundle.json file, and upload it here into this discussion thread:

Screenshot_2023-08-29_100800

This will allow others to better assist you. Thanks!

2 Likes

Hiii… Simplified the values. I want to know the column name by looking for values as in output i don’t find the names as only numbers are there. If i can get column numbers that is also fine. I will be using google sheets modules next to generate a weekly report.

[
{
“0”: “10/5/2023”,
“1”: “Value”,
“2”: “390.00”,
“3”: “393.00”,
“4”: “395.00”,
“5”: “0.96”,
“6”: “1.73”,
“7”: “2.25”,
ROW_NUMBER”: 2,
SPREADSHEET_ID”: “1RKC2uPIWqcPgVP62M2fUdC1wALj3CjNuL30m8JMQU1k”,
SHEET”: “Sheet7”,
IMTLENGTH”: 1,
IMTINDEX”: 1
}
]
output.json (403 Bytes)

You can use the Google Sheets “Get Range Values” module to get the first/header row names.

Output:

Then, you can reference them however you like:


(header column value : data value)

2 Likes

But then how can i i search for column name with respect to numbers. Like 390.00?

Steps

1.

You can use an iterator to loop through all the values

Screenshot_2023-10-05_151017

2.

Then use a filter to only allow the value you want to search for

3.

Then get the column name from the bundle position


Example

1. Data

2. Search for value “2

3. Get column name (Number of Tickets)

2 Likes

Thanks for the Solution…

2 Likes