ce icon indicating copy to clipboard operation
ce copied to clipboard

Formula is not working after paste and drag event

Open bilencekic opened this issue 7 years ago • 1 comments

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);
							
						}
					}
	
					
				}
			}

bilencekic avatar Oct 30 '19 09:10 bilencekic

this has been fixed in v3.6.0+

pphod avatar Oct 31 '19 12:10 pphod