Hi,
I have run your script in Origin 8.1 in my computer, it works. However, maybe you can try the following script, which does the same thing as your script.
%N=Test;
newbook name:=%N option:=lsname; // newbook x-function
wks.ncols = 0; // set column number to zero
wks.addCol(A); // add A column
wks.addCol(Gauss); // add Gauss column
wks.addCol(DS); // add DS column
wks.col1.type = 4; // set A column to X
Penn