I’m referring to this gembox page right here → Add Hyperlinks to Excel Cells in C# and VB.NET | GemBox.Spreadsheet Example
I have the same code but instead of having the location as a cell inside the same worksheet, I’m using a cell of a different worksheet as the location.
It works just fine in Excel, but when I try to convert to PDF using GemBox, it becomes not clickable anymore.
I tried to use a hyperlink formula along with the Calculate method, it didn’t work too.
Here’s my code:
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY"); var workbook = new ExcelFile(); var worksheet = workbook.Worksheets.Add("Hyperlinks"); var secondWorksheet = workbook.Worksheets.Add("SecondWorksheet"); var hyperlinkStyle = workbook.Styles[BuiltInCellStyleName.Hyperlink]; var cell = worksheet.Cells["B3"]; cell.Value = "Jump"; cell.Style = hyperlinkStyle; cell.Hyperlink.ToolTip = "This is tool tip! This hyperlink jumps to E1."; cell.Hyperlink.Location = secondWorksheet.Name + "!E3"; workbook.Calculate();
Link to download the excel file generated by the code above: Hyperlinks.xlsx - Google Sheets
Link to download the PDF I got after converting that Excel file: (It’s allowed only two links)
Please let me know if you guys need any further information.
Thanks in advance!