0

I have fetched an excel sheet (which includes charts) from S3 bucket and uploaded it into s3 bucket again. But charts in the Excel sheet are deleted in the exported the Excel sheet. Is there anyway to fix this issue?

                   // Get template file from s3
                   buffer = await getBufferFromS3Promise(templateParams);

                   // Read template file using ExcelJS
                   const workbook = new ExcelJS.Workbook();
                   await workbook.xlsx.load(buffer)

                   // Write the modified workbook to a buffer
                   const buff = await workbook.xlsx.writeBuffer();

                   // Define destination s3 bucket path to save modified workbook
                   const s3Key = 'uploads/';

                   // Define parameters for S3 `putObject()` method
                   const params = {
                       Bucket: bucketName,
                       Key: s3Key,
                       Body: buff
                   };
                   console.log("params::", params)

                   // Save modified workbook to a S3 bucket
                   const result = await s3.putObject(params).promise();

I need export the excel sheet including the charts

  • Have you seen [THIS](https://stackoverflow.com/questions/64473898/why-are-the-charts-in-excel-deleted-if-i-export-the-data-with-exceljs) – Siddharth Rout May 25 '23 at 07:00

0 Answers0