Spread Windows Forms 8.0 Product Documentation
EnableCrossSheetReference Property
Example 


Enables cross-sheet referencing for this component.
Syntax
'Declaration
 
Public Property EnableCrossSheetReference As Boolean
'Usage
 
Dim instance As FpSpread
Dim value As Boolean
 
instance.EnableCrossSheetReference = value
 
value = instance.EnableCrossSheetReference
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.
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";
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

Reference

FpSpread Class
FpSpread Members
Sheet References in a Formula

User-Task Documentation

Specifying a Cell Reference

 

 


Copyright © GrapeCity, inc. All rights reserved.