Syncfusion.XlsIO.Base
Example 


GetPrecedents() Method

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

Return Value

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

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also