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
 Activate / Access a worksheet by its name

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
Torschtele Posted - 06/03/2004 : 10:10:26 AM
Hello everybody !

How do I access a worksheet by its name ?

E.g., if I want to copy data from a worksheet named "Source" to a worksheet named "Destination" then I have to declare the corresponding datasets by
Dataset(source_wks,0)
Dataset(destination_wks,0)
and then use Data_copy.

How do I get the above entries 'source_wks' and 'destination_wks' from the name of the worksheets ? This is necessary if the worksheets were not created in Origin C (then one always has a line like 'Worksheet wks_name' and one can easily access that worksheet by "wks_name") but existed before a script was started...

I appreciate your help on this,
regards,
Torsten

PS: Sorry for this "trivial" question, but I am rather new to this Origin C language
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/03/2004 : 10:40:17 AM
Hi Torsten,

Just use the names...

string source_wks_name = "Data1";
string destination_wks_name = "Data2";
Dataset dsSrc(source_wks_name,0);
Dataset dsDest(destination_wks_name,0);
Data_copy(&dsDest,&dsSrc);

Mike Buess
Origin WebRing Member

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