How to Update multiple cells at once ( like, updating a range of cells, but with different data for each cell )

I want to know if there is any method exists to update a range of cells at once with different value for each cell.
Something like below shared code.

I'm using the latest version of syncfusion

const cellsToUpdate = [
{ cellAddress: 'A2', value: '1' },
{ cellAddress: 'B2', value: '2' },
{ cellAddress: 'C2', value: '3' },
];
const spreadsheet = this.getSpreadsheetRef();
spreadsheet.updateCells(cellsToUpdate);

1 Reply

VR Vasanth Ravi Syncfusion Team November 9, 2023 03:04 AM UTC

Hi Leninkumar,


Your requirement can be achieved by using updateRange method. On a button click event we have constructed the data source and update to the sheet via updateRange method. Attached sample for reference.


Stackblitz Sample: https://stackblitz.com/edit/94qodm-4zofsb?file=src%2FApp.vue


API Link: https://ej2.syncfusion.com/vue/documentation/api/spreadsheet/#updaterange


Get back to us if you need any other further clarifications.


Loader.
Up arrow icon