How to pass bulk value to reset in JExcel cell

672 Views Asked by At

I am using JExcel in my project below code I need each time call script to set new value in JExcel cell. I need to know how to pass a set of array value to pass bulk data.

$('#id').jexcel('setValue', 'A1', 9999, true);

$('#id').jexcel('setValue', 'A8', 123, true);

$('#id').jexcel('setValue', 'C3', 3242, true);

$('#id').jexcel('setValue', 'D1', 'Test', true);
2

There are 2 best solutions below

0
Paul On

In the version 3 you can apply setRowData to change one row.

0
bob tang On

it has an API setData in the version 3, which gives users an easy way to pass an array.

for example, you have defined your jexcel already, and now you want to set the data in bulk with an array

$('#my-spreadsheet').jexcel('setData', array_data);