Please check the following sample script to use the ExpDec1 fitting function to fit the sample data, and save the fitted parameter t1 to a new workbook. You may want to refer to the Labtalk Help page of nonlinear curve fitting:
https://www.originlab.com/doc/LabTalk/guide/Non-linear-Fitting
newbook;
wbook.dc.add("CSV");
wks.dc.source$=System.path.program$+"Samples\Curve Fitting\Gaussian.dat";
wks.dc.import();
int istart = list(max(Col(B)), Col(B)); // get the index of max y value
nlbegin iy:=(1,2)[istart:end] func:=ExpDec1 nltree:=ParamTree;
ParamTree.t1 = 5;
nlfit;
newbook;
Cell(1,1) = ParamTree.t1;
James