Meher
Meher

Reputation: 7

Extracting Data from Google sheet whose name is in another cell

I have written a script to get all the names of worksheets currently present in my Google Sheet. Now I want to extract the first cell (A1) from one of the sheet names that I am fetching.

Can you please help me here?

Upvotes: 0

Views: 40

Answers (1)

doubleunary
doubleunary

Reputation: 18784

Try SpreadsheetApp.getActive().getRange(sheetName + '!A1').getValue().

Some of the best resources for learning Google Apps Script include the Beginner's Guide, the New Apps Script Editor guide, the Fundamentals of Apps Script with Google Sheets codelab, the Extending Google Sheets pagejavascript.infoMozilla Developer Network and Apps Script at Stack Overflow.

Upvotes: 1

Related Questions