COM xlApp; COM wks; COM rng; xlApp = - COM('Excel.Application') wks = xlApp.ActiveSheet(); rng = wks.UsedRange(); rng.Formula(rng.Value2());