Convert Excel to PDF - Preserving Hyperlink Functions not Working

Hi,

When we create a hyperlink formula in an excel spreadsheet and convert it to PDF the hyperlink is no longer working.
image.png (29.3 KB)
However, if we create a hyperlink by right clicking a cell and inserting hyperlink then it works fine after conversion.

This is the code that we are using -

Aspose.Cells.PdfSaveOptions pdfOptions = new Aspose.Cells.PdfSaveOptions();
pdfOptions.CalculateFormula = true;
pdfOptions.OnePagePerSheet = sourceDoc.OnePagePerSheet;
pdfOptions.AllColumnsInOnePagePerSheet = sourceDoc.AllColumnsInOnePagePerSheet;

string filePath = “path.pdf”;

workbook.Settings.FormulaSettings.CalculationMode = CalcModeType.Automatic;
workbook.CalculateFormula();
workbook.Save(filePath, pdfOptions);

I am using the following library versions:
Aspose.PDF - 24.2.0
Aspose.Cells - 24.4.0
I have tried updating both to the most recent versions of both libraries but that didn’t work either.

Is there a bug in the library or am I missing something?

I can’t attach a sample xlsx file to this message but they are easy to create, see image above.

Kind regards,

Djs

@djsomers1000

Looks like the issue is related to Aspose.Cells. We are moving this inquiry to the respective forum where this will be addressed accordingly.

@djsomers1000
The Hyperlink functions works with the following sample file:
24.2 (2).zip (12.2 KB)

Could you post your template file? We will check it soon.

Your file works for me as well, however, if you add a friendly name as well, as seen in the image below, then the link no longer works:

image.png (18.3 KB)

=HYPERLINK(“https://docs.aspose.com/cells/net/","Aspose Cells”)

Aspose.zip (32.3 KB)

Kind regards,

DJS

This was the PDF output as well:

input.pdf (12.8 KB)

@djsomers1000,

After an initial test, I am able to reproduce the issue as you mentioned by using your sample file and sample code segment. I found that preserving hyperlink function not working when converting Excel file to PDF.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55783

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@djsomers1000,

This is to inform you that your issue (logged as “CELLSNET-55783”) has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.6) that we plan to release in the first half of June 2024. You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSNET-55783) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi

Thanks for the update!

@djsomers1000
You are welcome.