My more learned Origin C guru colleagues may provide a better way to do it, but here is code that will achieve what you want:
void copy_paste_link(const Worksheet& wks_in, int col_in, int row_in, const Worksheet& wks_out, int col_out, int row_out)
{
string str1 = wks_in.MakeRangeString(wks_in.Columns(col_in).GetName(), NULL, 0, -1);
string str2;
str2.Format("cell://%s[%u]", str1, row_in + 1);
wks_out.SetCell(row_out, col_out, str2);
}
void abc()
{
Worksheet wks = Project.ActiveLayer();
copy_paste_link(wks,0, 0, wks, 1, 1);
}
Thanks,
Chris Drozdowski
Originlab Technical Support