Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda