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

169
Vistas
Styling issue on an excel sheet on nodejs with excelJS

im using excelJS library to manipulate excel file, Im trying to mark one row at a certain color and its filling almost the whole table, So i tried filling only one cell and it returns the same problem and coloring almost the whole sheet. Anyone knows if its a known library bug or is it a bug with my code ?

const wb = new ExcelJS.Workbook();

const fileName = 'DevExercise.xlsx';


wb.xlsx.readFile(fileName).then(() => {
    

    // Iterate over all sheets
    wb.eachSheet(function (worksheet, sheetId) {

        // Iterate over all rows that have values in a worksheet
        worksheet.eachRow(function (row, rowNumber) {

            worksheet.getCell('G' + rowNumber).value = sumRow(row.values[3], row.values[4], row.values[5], row.values[6])
            if (row.values[2] == "Rent"){
                worksheet.getCell('C1').fill = {
                    type: 'pattern',
                    pattern:'darkVertical',
                    fgColor:{argb:'ffff00'}
                  };
                console.log("C" + rowNumber);
            }
            
        })

        

     
    });

    wb.xlsx.writeFile("copy" + fileName)
    .then(function() {
        // done
    });

}).catch(err => {
    console.log(err.message);
}); ```

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