Is it not possible to add image using the WorkbookWriter?
See original GitHub issuePreviously I tried using the excel file writing method. Works fine, but as the data grows so does the memory consumption. Hence the changing of writing method to streaming method.
Tried doing this on WorkbookWriter
var sheet = workbook.addWorksheet('Data');
var base64Data = req.body.img.toString().replace(/^data:image\/png;base64,/, "");
fs.writeFile('Tagihan/img.png', base64Data, 'base64', function(err) {
console.log(err);
})
var img1 = workbook.addImage({
filename: 'Tagihan/img.png',
extension: 'png'
});
sheet.addImage(img1, 'A1: H25');
got this error
TypeError: workbook.addImage is not a function
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (2 by maintainers)
Top Results From Across the Web
writing image to excel with xlsxwriter returns " workbook not ...
The error comes from this line: self.workbook = self.writer.book('Name1'). Book is an object, not a method and it has the following fields ...
Read more >Insert a picture in Excel for the web - Microsoft Support
Inserting a picture in your worksheet is an easy way to show information or add visual interest. There are three ways to add...
Read more >@mmcraven/exceljs - npm
Then, using the imageId, the image can be added to the worksheet either as a tiled background or covering a cell range. Note:...
Read more >The Workbook Class — XlsxWriter Documentation
The Workbook() constructor is used to create a new Excel workbook with a given ... to convert strings to numbers, where possible, using...
Read more >How to Insert Picture Into a Cell in Excel (a Step-by-Step ...
This could also be useful if you're working with products/SKUs and their images. When you insert an image in Excel, it not linked...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you planning to support this in future?
Duplicate of #322 and #351.