Free Support Forum - aspose.com

ODS to XLSX - hyperlink not preserved


#1

Using aspose-cells-18.11 JDK to convert ODS to XLSX.
Converting spreadsheet with a hyperlink in a cell. The hyperlink is replaced by plain text.

Code below:
LoadOptions loadOptions = new LoadOptions(FileFormatType.ODS);
Workbook workbook = new Workbook(inputPath,loadOptions);
workbook.save(outputPath, SaveFormat.XLSX);

Before/after sample attached
Missing hypertext.zip (14.7 KB)


#2

@simon.wiseman,

Thanks for your query.

I have tried this scenario using latest version Aspose.Cells for Java 18.12.x and observed that hyperlink is functional. Could you please test the scenario again using latest version and provide the feedback?


#3

Apologies. Closer inspection reveals that the generated Excel spreadsheet does indeed have a hyperlink in it. But normally when you insert a hyperlink in Excel you get the underline property added to the text, so it looks like a hyperlink. In Open Office, hyperlinks are shown as a text object, not with underlining.
So the “issue” is that the two applications are using different ways of indicating a hyperlink.
You could argue the SDK is doing the right thing, as the original is not underlined, or say that it should add underlining as that is the normal way hyperlinks are displayed in Excel - but they don’t have to have underlining.
A tough one…


#4

@simon.wiseman,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42798 - ODS->XLSX - Hyperlink is functional but shown as plain text

#5

@simon.wiseman,

Please try our latest version/fix: Aspose.Cells for Java v18.12.9 (attached)

Please try the following sample code with the latest fix/version v18.12.9:
e.g
Sample code:

ODSLoadOptions loadOptions = new ODSLoadOptions();
            loadOptions.setApplyExcelDefaultStyleToHyperlink(true);
            Workbook workbook = new Workbook(Constants.sourcePath + "CELLSJAVA42798.ods", loadOptions);

Let us know your feedback.
Aspose.Cells for Java_v18.12.9.zip (6.4 MB)


#6

The issues you have found earlier (filed as CELLSJAVA-42798) have been fixed in Aspose.Cells for Java 19.1. You can also get the latest Aspose.Cells for Java version from Maven repos. with simple configurations. Please see the document for your reference: https://docs.aspose.com/display/cellsjava/Installation

This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi