Closed Ily1606 closed 6 months ago
When using an array of object you need to give columns the property name.
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{
// Data pass as a reference
data: data,
columns: [{
// Path to the data property for this column
name: 'name',
title: 'Full name',
type: 'text',
width: '200px',
},
{
// Path to the data property for this column
name: 'address.number',
title: 'Number',
type: 'text',
width: '200px',
},
{
// Path to the data property for this column
name: 'address.city',
title: 'City',
type: 'text',
width: '300px',
}]
}]
});
Note that the name represent the adress of your object (nested addresses are accept as above)
When using
The options.data has been modified when jspreadsheet rendering.