You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use this package to parse data.xlsx and want to get the inline image, but it failed.
Lib version: 4.4.0
Steps To Reproduce
importExcelJSfrom'exceljs';const{ Workbook }=ExcelJS;constworkbook=newWorkbook();constdata=awaitworkbook.xlsx.readFile('data.xlsx');constworksheet=workbook.worksheets[0];for(constimageofworksheet.getImages()){console.log('processing image row',image.range.tl.nativeRow,'col',image.range.tl.nativeCol,'imageId',image.imageId);// fetch the media item with the data (it seems the imageId matches up with m.index?)constimg=workbook.model.media.find(m=>m.index===image.imageId);console.log('found image for imageId',image.imageId,'extension',img.extension);// fs.writeFileSync(`${image.range.tl.nativeRow}.${image.range.tl.nativeCol}.${img.name}.${img.extension}`, img.buffer);}
The expected behaviour:
worksheet.getImages() should returns the inline images.
🐛 Bug Report
I tried to use this package to parse data.xlsx and want to get the inline image, but it failed.
Lib version: 4.4.0
Steps To Reproduce
The expected behaviour:
worksheet.getImages()
should returns the inline images.Possible solution (optional, but very helpful):
worksheet.getImages()
returns the inline images.worksheet.getCell('C2')
returns the image data.data.xlsx
The text was updated successfully, but these errors were encountered: