Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

110
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda