Skip to content

Is it not possible to add image using the WorkbookWriter? #446

@mfahmirukman

Description

@mfahmirukman

Previously 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions