Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
How to define a variable with spreadsheet cell value for Wordpress

I want to define a javascript variable with google spreadsheet value.

The Range is B2

It will be executed on wordpress site ..

First I want to define a variable with cell value .. And then I want to use that variable for innerHtml of

element.

I'm new to javascript.

Pls give the format of code and I will modify that code. with my spreadsheetId

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Where do you want to execute your code to?

1. Using Google Apps Script

If you want to save a cell value as a variable, you need to use Google Apps Script:

var cellValue = SpreadsheetApp.getActiveSheet().getRange('B2').getValue();

After that you can use your variable in your Apps Script code.

2. Using Node JS

If you're using the NodeJS library, you need to read the file using a async function with some methods:

   const sheets = google.sheets({version: 'v4', auth});
    sheets.spreadsheets.values.get({
    spreadsheetId: 'ID',
    range: 'Sheet Name!range',
  }

For more info visit the documentation on: https://googleapis.dev/nodejs/googleapis/latest/sheets/classes/Resource$Spreadsheets.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!