Hello Aspose Team
Thanks in advance !
Hello Aspose Team
Hi David,
{
if (field.Type == FieldType.FieldHyperlink)
{
FieldHyperlink link = (FieldHyperlink)field;
// modify the link object as you need
}
}
Hi
HI,
Hi David,
Hi David,
David:
In Aspose.Cells, we can able to find whether workbook has any external links (eg workbook.HasExernalLinks()).
David:
Also in Aspose.Cells, we can able to find whether the links are used or not using below code
David:
While checking the existing links with old linkif (hyperlink.Target.ToString() == OldLink)In runtime, hyperlink.Target.ToString() returns “C:\\KM Project\\broshare Statics Report.xlsx” value which doesnt match with my oldLink input value.
NodeList fieldStarts = doc.SelectNodes("//FieldStart");
foreach (FieldStart fieldStart in fieldStarts)
{
if (fieldStart.FieldType.Equals(Aspose.Words.Fields.FieldType.FieldHyperlink))
{
FieldHyperlink hyperlink = (FieldHyperlink)fieldStart.GetField();
if (!string.IsNullOrEmpty(hyperlink.SubAddress))
continue;
if (hyperlink.Address.ToString() == @"C:\KM Project\broshare Statics Report.xlsx")
{
hyperlink.Address = "http://community.com/sites/km/TEST/EXFIX%20Testing/broshare Statics Report.xlsx";
}
}
}
doc.Save(MyDir + @"16.3.0.docx");