This has to do with 2017 intrudced column shortname restriction by default on creating new books. See
http://originlab.com/doc/Origin-Help/Column-Short-Names-Restrict
You can just add
page.XLColName=0;
before your column rename code.
If you need the same code to work on earlier version, then
if(@v>=9.4) page.xlcolname=0;
CP