my scenario is that in one Excel cell I have hyperlink.
Text in Cell is: PDF Contract.
When I check hyperlink properties I see that TextToDisplay is also PDF Contract.
Now if I change Cell value to PDF ASPOSE when I open document and go to Edit Hyperlinks I see that TextToDisplay is PDF ASPOSE but when I run code:
For Each worksheet As Worksheet In officeDocument.Worksheets
For Each hpl As Aspose.Cells.Hyperlink In worksheet.Hyperlinks
Try
TextToDisplay = hpl.TextToDisplay
Catch ex As Exception
TextToDisplay = “n.a”
End Try
TextToDisplay shows still PDF Contract.
I attached original document (original.xls) and updated document (Output.xls) plus I attached screenshots.
Unfortunately I do not have project as this development is part of big project but coding is simple.
Search for word contract in cells and replace it with ASPOSE. Loop through hyperlinks collection and check TextToDisplay which is wrong. If you check in Excel over Edit Hyperlink you’ll see that TextToDisplay is correct.
We were able to observe this issue by executing the following code with your output excel file. It should print “PDF ASPOSE” but it prints “PDF Contract” which means TextToDisplay property is not updated.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
CELLSNET-43900 - Hyperlink.TextToDisplay is not updated
C# Workbook workbook = new Workbook(“output.xls”);
This is to update you that we have fixed your issue “CELLSNET-43900” now. Hopefully we could provide the fixed version in the next few days (2-5 days) after performing QA and incorporating other enhancements and fixes.