quote:
Originally posted by kubra
Origin Ver. and Service Release (Select Help-->About Origin): 8.5
Operating System:WIN7
Hello.
I have a problem with somehow automatic size of created worksheet. Here is part of my code:
double HSat = 10000;
double deltaHa = 1000;
double deltaHb = 1000;
int nmbPoints = HSat/deltaHb;
int deltaPoints = deltaHa/deltaHb;
Worksheet newwks;
newwks.Create("new");
newwks.SetSize(2*nmbPoints+1,b+1);
newwks.Columns(0).SetLongName("H");
newwks.Columns(0).SetUnits("Oe");
Problem is... Worksheet is created, however, if the numberof rows in SetSize command is under 23, worksheet is automatically created with 29 rows (cols number b is calculated in separated loop and there is no problem with it). Redundant rows can´t be deleted neither automatically nor with code. Is it feature of language, Origin settings or code problem?
Thanks and have a nice day!
Your worksheet has enabled Auto Add Rows.
To disable it, you can use LabTalk script wks.autoaddrows = 0
, or use okoc_create_workbook() instead.
See
1. http://www.originlab.com/doc/LabTalk/ref/Wks-obj
2. http://www.originlab.com/doc/OriginC/ref/okoc_create_workbook
©c¡Ï ¤È¥¹ ©f¨u©c ©c¥ì ¥Î¤³ ©c/ ©¦£¯
©c¨Ê¥Î ¤´¥¨ ¥ó ¨× ¥ó¤á' ¥Ì©¦¥ /¤í ¥Õ©¦©f
¨Ö ¦á ©¦£þ ©` ¥Õ ©¦
©¦