Last Update: 5/15/2017
Starting with Origin 2017, workbooks support a simplified worksheet cell notation, similar to MS Excel. When this cell notation is turned on -- indicated by this icon in the upper-left corner of the workbook page -- column Short Names are not editable and cannot be reordered.
While workbooks created with commands like win -t or the X-Function newbook have this column naming restriction turned off by default, any scripting operation that attempts column renaming or re-ordering on a book in which it IS turned on, will fail.
To prevent such errors you will need to insert the following before your column renaming code:
page.XLColName=0; // remove column short name restriction
If you need the same code to work on Origin versions prior to 2017, then you can insert this variation before your renaming code:
if(@v>=9.4) page.xlcolname=0; // remove column short name restriction if Origin version is 9.4(2017) or later
Keywords:short name restriction, spreadsheet cell notation, reorder