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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 GetWorksheet for pasting data into Excel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 11/04/2005 :  10:22:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Win2000
Operating System: 7.5 SR5

Hi,

A simple request but I hate excel ranges and can't find a clear example:

Could some please assist? All I want to do is copy a range from an Origin worksheet r1 c1 r2 c2 to an excel sheet starting at a known position eg activesheet.cells(10,1).

Thanks,

cheers,

Pete

easwar

USA
1964 Posts

Posted - 11/05/2005 :  8:31:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,

I presume you are asking how to transfer data from Origin Wks to Excel Wks when you are operating in the mode where Excel is client and Origin is COM Server?

If yes, one way is to declare a range object in Excel and then set the value of the range using the GetWorksheet method.

For example, one could manually select a group of cells in Excel and give it a range name, or programmatically give a range a name (which one needs to look up in Excel VBA help some place), and once a range has been established, one can use code such as:
Set rngParams = Range("FitParams")
rngParams.Value = myObj.GetWorksheet("FitParams", 0, 1, 4, 4)
where FitParams is the name of the range in Excel, and the argument FitParams in the GetWorksheet method is the name of the Origin wks (which just happens to be the same in this example).

You can look at the example
\Samples\Automation Server\Excel\DoseResponseCurveFitting.XLS

Easwar
OriginLab

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000