Syncfusion.XlsIO.Base
Example 


Indicates whether to check from other worksheets.

GetPrecedents(Boolean) Method

Gets the precedent cells which are referred by a formula in another cell.
Syntax
'Declaration
 
Overloads Function GetPrecedents( _
   ByVal isEntireWorkbook As Boolean _
) As IRange()
'Usage
 
Dim instance As IRange
Dim isEntireWorkbook As Boolean
Dim value() As IRange
 
value = instance.GetPrecedents(isEntireWorkbook)
IRange[] GetPrecedents( 
   bool isEntireWorkbook
)

Parameters

isEntireWorkbook
Indicates whether to check from other worksheets.

Return Value

Returns the precedent cells with a specified bool value or null if value was not found.
Example
The following code illustrates how to get the precedent cells from all the worksheets.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Create("FormulaExcel.xlsx");
IWorksheet sheet = workbook.Worksheets[0];
            
IRange[] results = sheet["A1"].GetPrecedents(true);
            
string fileName = "Precedents.xlsx";
workbook.SaveAs(fileName);
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also