Spread Windows Forms 7.0 Product Documentation
EnableCrossSheetReference Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : EnableCrossSheetReference Property


Glossary Item Box

Enables cross-sheet referencing for this component.

Syntax

Visual Basic (Declaration) 
Public Property EnableCrossSheetReference As Boolean
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim value As Boolean
 
instance.EnableCrossSheetReference = value
 
value = instance.EnableCrossSheetReference
C# 
public bool EnableCrossSheetReference {get; set;}

Property Value

Boolean: true if cross-sheet referencing is enabled; false otherwise

Remarks

In a multiple-sheet Spread component, a formula in a cell can refer to a cell in an entirely different sheet. This allows calculations to make use of data and formulas on any of the sheets in a Spread component. Referencing a cell in another sheet is called cross-sheet referencing.

Set this property to true to allow and enable cross-sheet references; set this property to false to disallow or disable cross-sheet references.

Refer to Sheet References in a Formula for more information about making the sheet name explicit in a cell reference.

Example

This example sums the values from the first sheet and places the sum in the second.
C#Copy Code
fpSpread1.EnableCrossSheetReference = true;
fpSpread1.Sheets.Count = 2;
fpSpread1.Sheets[0].Cells[0, 0, 50, 50].CellType = new FarPoint.Win.Spread.CellType.NumberCellType();
fpSpread1.ActiveSheet.Cells[0, 0].Value = 100;
fpSpread1.ActiveSheet.Cells[1, 0].Value = 100;
fpSpread1.Sheets(1).Cells[0, 0, 50, 50].CellType = new FarPoint.Win.Spread.CellType.NumberCellType();
fpSpread1.Sheets(1).Cells[1, 3].Formula = "Sheet1!A1+Sheet1!A2";
Visual BasicCopy Code
FpSpread1.EnableCrossSheetReference = True
FpSpread1.Sheets.Count = 2
FpSpread1.Sheets(0).Cells(0, 0, 50, 50).CellType = New FarPoint.Win.Spread.CellType.NumberCellType
FpSpread1.ActiveSheet.Cells(0, 0).Value = 100
FpSpread1.ActiveSheet.Cells(1, 0).Value = 100
FpSpread1.Sheets(1).Cells(0, 0, 50, 50).CellType = New FarPoint.Win.Spread.CellType.NumberCellType
FpSpread1.Sheets(1).Cells(1, 3).Formula = "Sheet1!A1+Sheet1!A2"

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.