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

441
Visualizações
Is there a JavaScript function to append data to specific cells in Google sheets?

Good day all,

I have created macro-enabled Excel file that unfortunately will be not usable by the company I work at since they decided to use Google sheets.In this Excel workbook,there is one data entry form which looks like that: Data entry form . The data from this form gets written under specific columns in another Excel sheet. In Excel I could use VBA to create the functionality of the 'Submit' button which sends the data to the respective sheet,however,in Google Sheets JavaScript is supported and not VBA.So far, this is the JavaScript function I have managed to create:

function inputData() {
  const ss=SpreadsheetApp.getActiveSpreadsheet()
  const form=ss.getSheetByName("Input")
  const prodlog=ss.getSheetByName("Product log")
  const fieldRange=["B1:D1","B3:D3","B5:D5","B7:C7","B9:D9","B11:D11","B13:C13"]
  const fieldValues=fieldRange.map(f=>form.getRange(f).getValue())

  //console.log(fieldValues)

  prodlog.appendRow(fieldValues)

}

However, the appendRow () function doesn't allow specifying where exactly the data should be appended.Any ideas how this can be achieved?Thank you in advance for your suggestions.

about 4 years ago · Juan Pablo Isaza
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