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 isAll As Boolean _
) As IRange()
'Usage
 
Dim instance As IRange
Dim isAll As Boolean
Dim value() As IRange
 
value = instance.GetPrecedents(isAll)
IRange[] GetPrecedents( 
   bool isAll
)

Parameters

isAll
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.1460.0.32

See Also