[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IWorkbook.UpdateExcelLinks

UpdateExcelLinks Method

Updates all Excel links in the workbook.

Use this method to refresh the caches of external workbook links used by cross-workbook formulas.

Declaration
void UpdateExcelLinks()
Sub UpdateExcelLinks()
string sourceFileName = "SourceWorkbook.xlsx";
IWorkbook sourceWorkbook = new Workbook();
sourceWorkbook.Worksheets[0].Range["A1"].Value = "Updated value";
sourceWorkbook.Save(sourceFileName);
worksheet.Range["B1"].Formula = $"='[{sourceFileName}]Sheet1'!A1";
IEnumerable<string> linkSources = workbook.GetExcelLinkSources();
workbook.UpdateExcelLinks();
object updatedValue = worksheet.Range["B1"].Value;