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

360
Visualizações
workbook.xlsx.writeBuffer() is working fine in Dev but not working in production

I am using ExcelJs Lib(1.12.0) inside angular 6 but this Lib is wokring fine in dev but not in production its failing at point workbook.xlsx.writeBuffer().

import * as ExcelJS from "exceljs/dist/exceljs.min.js";

downloadExcelFile() {
const title = 'Titlename';
const header = 'headerdata'
const data = 'actualData';

let workbook = new ExcelJS.Workbook();
let worksheet = workbook.addWorksheet(title);

worksheet.addRow(header);

for(let d of data) {
  worksheet.addRow(d);
}

workbook.xlsx.writeBuffer().then((data) => {
  let blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
  const anchor = document.createElement('a');
  const url = URL.createObjectURL(blob);
  anchor.href = url;
  anchor.download = title + '.xlsx';
  document.body.appendChild(anchor);
  anchor.click();
  document.body.removeChild(anchor);
  URL.revokeObjectURL(url);
}).catch(err => console.log(err))
}

Its not able to download the file in production env.

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