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
 How to get number of worksheets in a workbook?OR..

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
reepingk Posted - 03/19/2018 : 6:52:32 PM
I tried all manners of "count" or "length" with wkspage.layers (so wkspage.layers.count() or wkspage.layers.length() or even just wkspage.length(), but nothing works. There has to be a way to do this. (Other than stepping through all the layers with a foreach statement and literally incrementing a count.)

For example.

	WorksheetPage wksPage("MyBookName");
	printf("Count:" + wksPage.Layers.count());



EDIT: Ok getting the count doesn't help, can we just go with the question below? (I was trying to add a bunch of data to a datarange object, then add them to a graph in the end so that they would be grouped automatically, but it didn't work, I needed the count to say "If currentcount = count, then add datarange to graph"))

OR: How do I group existing data on a plot? I have data on a plot that is not grouped, how do I group them all using OriginC?


Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
3   L A T E S T    R E P L I E S    (Newest First)
Castiel Posted - 03/20/2018 : 5:58:27 PM
quote:

I searched the manual for hours. Not even kidding. Why does that not show up when literally searching for "group"? I searched for group in the manual, programming reference, everything.



http://bing.com/search?q=group+site%3Aoriginlab.com%2Fdoc%2Foriginc


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 
reepingk Posted - 03/20/2018 : 12:49:26 PM
quote:
Originally posted by Castiel

quote:

	WorksheetPage wksPage("MyBookName");
	printf("Count:" + wksPage.Layers.count());



Capital C: Count instead of count.

quote:

OR: How do I group existing data on a plot? I have data on a plot that is not grouped, how do I group them all using OriginC?



https://www.originlab.com/doc/OriginC/ref/GraphLayer-GroupPlots


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 




I searched the manual for hours. Not even kidding. Why does that not show up when literally searching for "group"? I searched for group in the manual, programming reference, everything.
Castiel Posted - 03/19/2018 : 7:03:46 PM
quote:

	WorksheetPage wksPage("MyBookName");
	printf("Count:" + wksPage.Layers.count());



Capital C: Count instead of count.

quote:

OR: How do I group existing data on a plot? I have data on a plot that is not grouped, how do I group them all using OriginC?



https://www.originlab.com/doc/OriginC/ref/GraphLayer-GroupPlots


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 

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