Ways to add a hyperlink to cells in excel without using Write cell/write range excel activities?

Ways to add a hyperlink in Excel cells without using Write cell activity, because there is a huge list of rows in different sheets to get updated during a single process, and each cell the bot accesses the Excel which may not be an efficient way.
Any alternative ways to add hyperlinks to cells in Excel?

Is it always on the same cells? In that case, you could simply build a list with all the Cells and then simply loop through all of them with a single Write Cell

It’s not on the same cell, the bot loops through each row and adds the hyperlink. My point is using write cell every time the Excel keeps opening and closing which may be okay for a few rows but having to do the same for 24 sheets in Excel with 24 rows per sheet, may not be an efficient way I guess. Any thoughts please?

Hi @Swetha_Pandiyan ,

Could you maybe try disabling the Visible Property of the Excel Application Scope or if using Modern then Configure the Show Excel Window as False in Excel Process Scope activity and check ?

Thanks for your response. I did try to check on those properties too, my thought is even if I disable the visibility, meaning the Excel opens up in the foreground is not visible but either way, the Excel is actually being accessed every time right?

@Swetha_Pandiyan ,

Could you elaborate more on the current setup ? Do you have the data already present in the Excel sheet and do you want to convert the column values to a Hyperlink or Do you have the data present maybe in a Datatable that you would want to add it to an Excel sheet as a Hyperlink ?

Also, Let us know if you are using a Formula in Write Cell activity or if it is just the value.

So to elaborate on this the bot does the following

  1. Navigates according to step in a row - Takes a screenshot and saves the image
  2. Adding the hyperlink to that image in Excel for that particular row in a column named ‘screenshot’. The hyperlink formula is being used in Write cell.

so this process repeats for all rows like each row it executes and takes screenshots and updates the hyperlink to that row.

@Swetha_Pandiyan ,

In order to maybe avoid the Write Cell Operation everytime, Maybe we can first go ahead with Datatable methods, Store the values what you receive in a Datatable.

At the End, write the data to the Excel Sheet.

Next Step is to convert the value to a Hyperlink, So For this we can use another Column and update the value to a Hyperlink in the new column. This needs to be done once using a Write Cell activity.

Then we can leverage the activities Fill Range (Modern) or Auto Fill Range (Classic) to update the Formula to all the other cells.

This can be considered as a work around and may not be what you expected.

Hi @Swetha_Pandiyan

Certainly! Here are some alternative ways to add hyperlinks to cells in Excel using UiPath without using the Write Cell activity:

  1. Use the “Invoke VBA” activity: UiPath provides an activity called “Invoke VBA” that allows you to execute custom VBA code in Excel.l.
  2. Use the “Execute Macro” activity: UiPath also provides an activity called “Execute Macro” that allows you to execute a pre-existing VBA macro in an Excel workbook.
  3. You can use the “Excel Application Scope” activity in UiPath to work with Excel files, and then use Excel formulas to dynamically add hyperlinks to cells. You can leverage the HYPERLINK formula in Excel, as mentioned in the previous answer, to create hyperlinks in cells based on the values you want to add. You can use UiPath activities to write these formulas directly to the cells, updating them dynamically based on your requirements.

Uncheck the save property on the excel scope. Do all your operations then save at the very end

alternatively, you can do write cell with the formula for first cell, and give it the range for the destination. This will autofill

image