Spread ASP.NET 6.0 Product Documentation
CopyTo Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetViewCollection Class : CopyTo Method


array
Array into which to copy the sheets
arrayIndex
Array index at which to start pasting the sheets

Glossary Item Box

Copies the sheets in the collection to an array.

Syntax

Visual Basic (Declaration) 
Public Sub CopyTo( _
   ByVal array() As SheetView, _
   ByVal arrayIndex As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetViewCollection
Dim array() As SheetView
Dim arrayIndex As Integer
 
instance.CopyTo(array, arrayIndex)
C# 
public void CopyTo( 
   SheetView[] array,
   int arrayIndex
)

Parameters

array
Array into which to copy the sheets
arrayIndex
Array index at which to start pasting the sheets

Example

This example creates two SheetView objects, adds them to the current sheet and then copies the sheets to an array.
C#Copy Code
FarPoint.Web.Spread.SheetView[] myarray = New FarPoint.Web.Spread.SheetView[2];
FarPoint.Web.Spread.SheetView sv1 = New FarPoint.Web.Spread.SheetView();
FarPoint.Web.Spread.SheetView sv2 = New FarPoint.Web.Spread.SheetView();
sv1.GridLineColor = Color.Red;
sv1.GridLines = GridLines.Vertical;
sv2.GridLineColor = Color.Yellow;
sv2.GridLines = GridLines.Horizontal;
FpSpread1.Sheets.Add(sv1);
FpSpread1.Sheets.Add(sv2);
FpSpread1.Sheets.CopyTo(myarray, 0);
Visual BasicCopy Code
Dim myarray(2) As FarPoint.Web.Spread.SheetView
Dim sv1 As New FarPoint.Web.Spread.SheetView()
Dim sv2 As New FarPoint.Web.Spread.SheetView()
sv1.GridLineColor = Color.Red
sv1.GridLines = GridLines.Vertical
sv2.GridLineColor = Color.Yellow
sv2.GridLines = GridLines.Horizontal
FpSpread1.Sheets.Add(sv1)
FpSpread1.Sheets.Add(sv2)
FpSpread1.Sheets.CopyTo(myarray, 0)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.