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
 Origin Forum
 copy data into different sheets in a workwork

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
Marcel Spillker Posted - 03/03/2008 : 01:24:51 AM
Origin Version (Select Help-->About Origin): Origin 8 SRO v8.0725 (B725)
Operating System: Win XP
Hello,

iŽd like to copy some data from an excel workbook to origin via VBA.
I know that I can use "Putworksheet..." This is running very well.
But my workbook in Origin 8 consists of different worksheets, like Sheet1, Sheet2, ...
At the moment I donŽt know how to copy data into Sheet2, even Sheet1 is activate.
Has someone an idea how to do this?
5   L A T E S T    R E P L I E S    (Newest First)
larry_lan Posted - 03/06/2008 : 03:12:43 AM
Hi:

How about

ThisWorkbook.oApp.Execute ("win -a Data2;")


to active the worksheet window "Data2"? I think you can run LabTalk commands in this way.

Thanks
Larry
OriginLab Technical Services
Marcel Spillker Posted - 03/05/2008 : 11:25:19 AM
Hello Echo_Chu,

thanks for your answer. It works very fine. Thank You.
But there is still another question:
My Origin file consits of different workbooks, graphs,...
How can I activate the workbook in which IŽd like to paste my
data?
E.g. workbook "Data1" is active and IŽd like to paste my data in
workbook "Data2" ?

Marcel
Echo_Chu Posted - 03/05/2008 : 05:43:26 AM
Hi,

Could you try execute "page.active", for example

Public oApp As Origin.Application
'//To active the second sheet
ThisWorkbook.oApp.Execute ("page.active=2")





Edited by - Echo_Chu on 03/05/2008 05:43:52 AM
Marcel Spillker Posted - 03/05/2008 : 03:04:35 AM
Hello Deanna,

thanks for your reply. It helps alot.
But I didnŽt find a way to activate sheet2 in the example.
In the example I find a way to check if workbook "Data" is
existing. But no way to check for sheet2, sheet3, ...

I hope you can help me ones more.

Marcel
Deanna Posted - 03/03/2008 : 9:01:21 PM
Hi, putworksheet pastes the data into the active worksheet of the specified workbook.

Generally, it requires making Sheet2 active before you paste the data into it.

There is an example in "<Origin Program folder>\Samples\Automation Server\VB\SendNumericDataToWks". Please refer to it.

Deanna
OriginLab Technical Services

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