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

454
Visualizações
How can I add title and blank rows before table while exporting to excel from angularjs?

I want to export data from table into excel file, but I want to add title and few blank rows before table. Also I want to do some css for that table.

This is my code in .ts file and it works but I want to style it a little bit. I didn't find anything for my problem, but also I'm beginner in this :)

exportExcel() : void { const ws: XLSX.WorkSheet =XLSX.utils.json_to_sheet(this.excelArray);

/* generate workbook and add the worksheet */
const wb: XLSX.WorkBook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');

/* save to file */  
XLSX.writeFile(wb, this.fileName);

}

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

0

That package is well documented: https://www.npmjs.com/package/xlsx#writing-functions however they don't have any styling functionality.

Someone has forked the package to add styling: https://www.npmjs.com/package/xlsx-style, via the s property of a Cell Object

Answer taken from here: Create an excel file with a few styles using client side JavaScript (if possible using js-xlsx library)

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