
How to Create Hyperlinks in Excel using Node.js
Accessing and manipulating Excel files programmatically is not difficult. Routine chores can be time‑consuming, but automating them gives your business a competitive edge. In this guide we use the XLSX Javascript library to show how to create Hyperlinks in Excel using Node.js.
The following points will be covered:
- XLSX JavaScript library installation
- How to create Hyperlinks in Excel programmatically
- How to make a Hyperlink - advanced options
XLSX JavaScript library installation
The library provides a rich set of methods and detailed documentation. Install it either by downloading the API package or by running the commands below in your terminal or CMD.
npm install java
npm install aspose.cells
How to create Hyperlinks in Excel programmatically
Follow these steps to add a hyperlink to an Excel file.
- Initialize an instance of the Workbook class.
- Get the first worksheet with the getWorksheets method.
- Retrieve the worksheet at the required index using get.
- Access the HyperlinkCollection via the getHyperlinks method.
- Call the add method to insert a hyperlink at cell A1.
- Save the workbook with the save method.
Copy and paste the code below into your main file:
The result looks like this:

How to make a Hyperlink - advanced options
Explore additional features of the XLSX Javascript library to meet specific business needs.
- Create a Workbook object.
- Retrieve the worksheet with get.
- Call getCells to obtain the Cells collection.
- Use get to access the target cell.
- Set the cell value via setValue.
- Change the font color to blue with setColor.
- Get the HyperlinkCollection using getHyperlinks.
- Add a hyperlink to cell A1 with add.
- Save the file using save.
Get a Free License
You can obtain a free temporary license to try the API without evaluation limits.
Summing up
You have now learned how to create Hyperlinks in Excel using Node.js and explored advanced methods of the XLSX JavaScript library. Be sure to review the documentation for more features.
We also recommend following our Getting Started guide.
Stay tuned to conholdate.com for new blog posts and updates.
Ask a question
Post your questions or queries on our forum.
FAQs
How do I create multiple Hyperlinks in Excel?
Visit this link for a code snippet that shows how to create multiple hyperlinks in an Excel file using the XLSX JavaScript library.