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

160
Visualizações
Fill down formula using a "dictionary" for sheet and column values in Google Apps Script?

I'm looking to do a filldown formula in Google Apps Script. I have a "dictionary" that contains the sheet names and the columns that need to be filled. However I am running into an issue in that I can't get the sheet I need from my key value. The key returns the right string for the sheet name, but .getsheetbyname(key) "can't read property of null".

Here is what I have:

 function filldown(){
    var sheetNames = {
        "PO Tool Import":["A","AK","AL"],
        "Live Orders Aggregated":["A"],
        "Date Lookup":["A"],
        "Containerized POs":["A","B","C","D","E","F","K","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD","AE","AF","AG","AH","AI","AJ","AK","AL","AM","AN","AO","AP","AQ","AR","AS","AT"],
        }

for (var key in sheetNames){

    var sheetName = thisBook.getSheetByName(key).getSheetName();

    Logger.log(key);
    Logger.log(sheetNames[key]);
    Logger.log(sheetName);
    };
};

Using these returns, I will then create a formula to return the index for the columns and the length of the filldown/copy to range.

Any suggestions are appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Ok so after some review it turns out that the key was not the correct string to match the sheet names, as someone had change the names of the sheets in the workbook.

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