You will need to loop all columns and save the column longnames to a StringArray and copy to the target column:
StringArray sa;
for (int i = 2; i <= wks.ncols; i++) {
sa.add(wcol(i)[L]$);
}
range rr = 2!col(A);
sa.CopyTo(rr);
Python code maybe simpler:
import originpro as op
wb = op.find_book()
wks = wb[0]
names = wks.get_labels()[1:-1]
wks = wb[1]
wks.from_list(0, names)
James