Skip to content

[Q] Does Streaming XLSX Writer support addImage()? #2918

Open
@tinhktc

Description

@tinhktc

💬 Questions and Help

Hi, I’m currently using exceljs for generating reports in both normal and large-scale datasets.

I understand that WorkbookWriter (Streaming XLSX Writer) is designed for memory efficiency by writing rows directly to disk. I’ve successfully used addRow().commit() for writing large datasets.

However, I need clarification regarding image support:

❓ Can workbook.addImage() and worksheet.addImage() be used with Excel.stream.xlsx.WorkbookWriter?

When I attempt the following with streaming mode:

const workbook = new Excel.stream.xlsx.WorkbookWriter({ filename: 'output.xlsx' });
const sheet = workbook.addWorksheet('Example');

const imgId = workbook.addImage({
  filename: './image.jpg',
  extension: 'jpeg'
});
sheet.addImage(imgId, 'B2:D10');

I get the following error:

TypeError: sheet.addImage is not a function

Could you confirm whether this feature is supported or planned for future versions?

If not, are there any recommended workarounds (e.g., post-processing or hybrid rendering)?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions