Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to insert data into merged cell of an existing Excel file? #726

@e-ndrus

Description

@e-ndrus

Is there a way to insert data into a merged cell of an existing Excel file?

I am trying to do something like this:

const workbook = new Excel.Workbook();

  workbook.xlsx.readFile('invoice А.xlsx')
      .then(function() {
          let worksheet = workbook.getWorksheet(1);
          let  row = worksheet.getRow(26);
          row.getCell(2).value = 15;
          row.commit();
          return workbook.xlsx.writeFile('newInvoice.xlsx');
      })

The error message is TypeError: Cannot read property 'getRow' of undefined.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions