❄️✨Ho-ho-holiday offer for new projects! Check out our pricing page.

How to export hyperlinks to Excel?

Answered
Alex asked on July 22, 2019

Hello,
 
I have reports with hyperlinks which were implemented based on this example (https://jsfiddle.net/flexmonster/q1gtwj48/)
 
I have this lines in customizeCell event handler
cell.text = `<a href="${data.escapedLabel}" target="_blank" class="link">Link</a>`;
cell.style['z-index'] = 2;
 
After the data export to Excel the word 'Link' is displayed in the column with hyperlinks.
 
How to correctly export hyperlinks to Excel ?
 
Thanks for your help.

7 answers

Public
Vera Didenko Vera Didenko Flexmonster July 23, 2019

Hello, Alex,
 
 
Thank you for writing to us.
 
 
At the moment Flexmonster doesn't support preserving the hyperlinks when exporting to Excel.
 
 
Please let us know if this feature is critical for you.
 
 
Best Regards,
Vera

Public
Ilya July 23, 2019

Hello, Vera. 
This feature is critical for us, because of our biggest client, who wants to see links in Excel-files and asks us about that.

Public
Vera Didenko Vera Didenko Flexmonster July 24, 2019

Hello, Ilya,
 
Thank you for your reply.
 
Our team has added your request for preserving hyperlinks during export to our clients' wishlist.
However, we cannot provide an ETA since our roadmap is full at the moment.
We will notify you in case of any changes on the matter.
 
Meanwhile, our team kindly suggests the following workaround:
1) Generate a CSV file 
2) Generate Excel report on the server side with the necessary hyperlinks
 
Please let us know if you have any questions.
 
Best Regards,
Vera

Public
Alex December 16, 2025

Dear Flexmonster Team,

I am writing to follow up on a discussion from 2019 regarding the preservation of hyperlinks during Excel export.

Back then, it was mentioned that this feature was on the wishlist. Could you please clarify if there have been any updates or if this functionality has been implemented in the recent versions of Flexmonster?

This feature remains highly important for our reporting workflow.

Best regards, Alex

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 17, 2025

Hello, Alex,

Thank you for contacting us.

Currently, hyperlinks added via the customizeCell method using HTML <a> tags are not preserved during export. However, as a workaround, you can use the exportTo API call with destinationType parameter set to "plain". This option allows you to pass the exported Excel sheet into a callback handler on the client side. Using a third-party library such as SheetJS (xlsx), you can programmatically add hyperlinks to the necessary cells in the exported file, matching those added in Flexmonster.

We have prepared a working example illustrating how to add hyperlinks during Excel export (hyperlinks work on "Country" members): https://jsfiddle.net/flexmonster/vabfh1c8/
This approach provides you with full control over which cells have hyperlinks, allowing you to customize the implementation further to meet your specific requirements.

Please let us know if this approach would work for you.

Best regards,
Maksym

Public
Alex December 17, 2025

Hello Maksym,

Thank you for the suggestion and the provided example.

Unfortunately, the proposed workaround with SheetJS does not fully solve the issue for our use case for two main reasons:

  1. Uniform Display Labels: In our implementation, all hyperlinks are displayed with the static text "Link". Even if we post-process the Excel file to add underlying URLs, other export formats (like PDF or HTML) will still only show the non-functional text "Link" without the intended redirection, which is not acceptable for our clients.

  2. Cross-Format Consistency: We need a solution that works natively across all export types supported by Flexmonster, ensuring that the exported data remains functional regardless of the format.

Given these constraints, is it possible to handle this at the data transformation level or through a more global export configuration? For instance, could Flexmonster recognize specific cell metadata as a hyperlink during the export process, rather than relying on HTML tags injected via customizeCell?

I look forward to your thoughts on how to achieve consistent hyperlink behavior across all export formats.

Best regards, Alex

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 18, 2025

Hello, Alex,

Thank you for the detailed explanation.

We understand your concerns regarding cross-format consistency for exporting hyperlinks. Currently, Flexmonster does not support maintaining functioning hyperlinks injected with customizeCell in exported files.

However, the same general approach we described before, with destinationType: "plain" for Excel, can also be applied for HTML and PDF exports. These export types can likewise be post-processed on the client side before the final file is downloaded, allowing you to inject hyperlinks using external tools or custom logic appropriate to each format.

We agree that this approach is not equivalent to native link support and requires additional development; however, it is currently the only way to implement hyperlink export. Native link support is still on our wishlist.

Please let us know if you have any other questions.

Best regards,
Maksym

Please sign in or register to submit your answer