Hi changyue,
In Origin2021b with originpro v1.0.6, you can try to create the plot with source data first and then fit from graph, where the table will be added onto graph by default. like
import os
import originpro as op
wks = op.new_sheet()
wks.from_file(os.path.join(op.path('e'), 'Samples', 'Curve Fitting', 'Gaussian.dat'))
graph = op.new_graph(template='scatter')
gl=graph[0]
dp = gl.add_plot(wks, 1, 0)
gl.rescale()
model=op.NLFit('Lorentz')
model.set_range(f'{gl}!{dp.index() + 1}')
model.fit()
r, c = model.report(True)