Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sheet.addImage() does not working on loaded workbook #2749

Open
seokhyunyoon opened this issue Apr 18, 2024 · 0 comments
Open

[BUG] sheet.addImage() does not working on loaded workbook #2749

seokhyunyoon opened this issue Apr 18, 2024 · 0 comments

Comments

@seokhyunyoon
Copy link

seokhyunyoon commented Apr 18, 2024

馃悰 Bug Report

sheet.addImage() method does not working on workbook from workbook.xlsx.load()

Lib version: 4.4.0

Steps To Reproduce

Here's my case

const wb = new ExcelJS.Workbook();

//buffer from file
//that file has one sheet named 'Sheet1'
await wb.xlsx.load(buffer);

//imageBuffer is ArrayBuffer from axios
const imageId = wb.addImage({
  buffer: imageBuffer,
  extension: 'png',
});

//and also wb.getImage(imageId) is working fine
/*
 {
  buffer: <Buffer ...>,
  extension:'png',
  type:'image'
 }
*/
wb.worksheets[0].addImage(imageId,'A1:B2')

The expected behaviour:

When I created the workbook and workSheet directly there's no problem.
but it's not working on loaded file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant