ce
ce copied to clipboard
Formula is not working after paste and drag event
Once you paste from excel file to the jexcel control, SUM formula is not working. After paste, if you change any cell value manually then formula is working fine. Same thing for select and drag event.
for paste event i did a workaround but there is no event for drag;
function onpaste(el,records){
// get unique rows
const uniqueArr = [... new Set(records.map(data => data.row))]
for (let index = 0; index < uniqueArr.length; index++) {
const element = uniqueArr[index];
for (let index_form = 0; index_form < line.cols.length; index_form++) {
const element_form = line.cols[index_form];
if (element_form.COLFORMULA != '')
{
var result = line.instance.jexcel.executeFormula(line.instance.jexcel.getValueFromCoords(index_form,element),index_form , element);
line.instance.jexcel.records[element][index_form].innerHTML = result;
//line.instance.jexcel.setValueFromCoords(index_form, element, result, true);
}
}
}
}
this has been fixed in v3.6.0+