The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 automatic worksheet size?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kubra Posted - 08/04/2015 : 09:40:53 AM
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!
2   L A T E S T    R E P L I E S    (Newest First)
kubra Posted - 08/04/2015 : 12:14:36 PM
quote:
Originally posted by Castiel

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
   ��             ��          ����  �` ��   ��
                              ��






Thanks, works perfectly!

Have a nice day!
Castiel Posted - 08/04/2015 : 10:53:21 AM
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
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000