Copy

From OriginLab Wiki

(Difference between revisions)(Link to this page as [[OriginCOM:Worksheet-Copy]])
Jump to: navigation, search
Revision as of 09:00, 10 July 2008 (edit)
Originla (Talk | contribs)

← Previous diff
Revision as of 10:01, 20 August 2008 (edit) (undo)
Uploader (Talk | contribs)

Next diff →
Line 1: Line 1:
{{DISPLAYTITLE:Copy}} {{DISPLAYTITLE:Copy}}
 +[[category:PM]]
==Description== ==Description==
Line 9: Line 10:
</pre></code> </pre></code>
<code><pre> <code><pre>
-C++: bool Copy(Variant r1, Variant c1, Variant r2, Variant c2, Variant FullPrecession )+C++: bool Copy(_variant_t r1, _variant_t c1, _variant_t r2, _variant_t c2, _variant_t FullPrecession )
</pre></code> </pre></code>
<code><pre> <code><pre>
-C#: bool Copy(Variant r1, Variant c1, Variant r2, Variant c2, Variant FullPrecession )+C#: bool Copy(var r1, var c1, var r2, var c2, var FullPrecession )
</pre></code> </pre></code>

Revision as of 10:01, 20 August 2008


Contents

Description

Syntax

VB: Function Copy([ r1 As ByVal Object ], [ c1 As ByVal Object ], [ r2 As ByVal Object ], [ c2 As ByVal Object ], [ FullPrecession As ByVal Object ] ) As Boolean
C++: bool Copy(_variant_t r1, _variant_t c1, _variant_t r2, _variant_t c2, _variant_t FullPrecession )
C#: bool Copy(var r1, var c1, var r2, var c2, var FullPrecession )

Parameters

r1
--
c1
--
r2
--
c2
--
FullPrecession
--

Return

Remark

Examples

Dim myobj As Origin.ApplicationSI
 
Dim myWks As Origin.Worksheet
 
Dim myrng As Range
 
 
'Open a new instance of the Origin application
Set myobj = GetObject("", "Origin.ApplicationSI")
 
myobj.Execute ("doc -mc 1")
'base on 0
 
 
'we can create a opj test_wks, there are two worksheet book, and some layers
'load opj
myobj.Load ("c:\\test_wks.opj")
 
Set myWks = myobj.WorksheetPages(0).Layers(0)
 
'copy the worksheet range, and paste to excel 'A5:B24'
bSuccess = myWks.Copy(1, 2, 20, 3, True)
 
 
Set myrng = Range("A5:B24")
 
myrng.PasteSpecial

Version Information

8.0SR2

See Also