Question about hyperinternallink


#1

Hello,

I have an issue about addinternallink.

If I add the link WITHOUT putvalue to that cell, the text of that cell will be default as the link(one!A1), and the color is blue and will have an underline

If I add the link and putvalue to that call, the text in that cell will be displayed in black color and no underline.

Dim excel As Aspose.Excel.Excel = New Excel

excel.Worksheets(0).Name = "one"

excel.Worksheets.Add()

Dim xls As Aspose.Excel.Worksheet = excel.Worksheets(1)

xls.Cells("C4").PutValue("toFirstPage")

xls.Hyperlinks.AddInternalLink("C4", 1, 1, "one!A1")


#2

Please add two line of code:

xls.Cells(“C4”).Style.Font.Color = Color.Blue
xls.Cells(“C4”).Style.Font.Underline = FontUnderlineType.Single

If you don’t replace the default hyperlink text, MS Excel will automatically set color and underline. If you change the cell text, please change style setting also.