CREATE(loData); CREATE(loScript); lcCode :='loCell.Formula=loList.Item(1);'; lii:=1; // for each cell XlCell:=XlWrkSht.Range(xlColID + xlRowID); loScript.Language := 'JScript'; // Add objects loScript.AddObject('loCell', XlCell); // excel cell loScript.AddObject('loList', loData); // dictionary object lcPom:=GetFormula(); // Formula definition loData.Add(lii,lcPom); // Add formula to dictionary object loScript.ExecuteStatement(lcCode); // Execute javascript loData.RemoveAll(); // remove item from dictionary loScript.Reset(); // reset Script object for next using
Comments
I have tried with the example you provided. But I did't able to compile the code because of 'GetFormula()' Function it is not defined from where this function has to be called.
Please, Provide the Solution for this.
Regards,
kiran.