How to add comment in excel cell

I want to add new comment in excel cell. How can I achieve it without using macro or third party activities

Hi,

Unfortunately, there is no activity to handle comment in UiPath.Excel.Activites package.

We can achieve it using UiAutomation (Click, TypeInto and Shortcut etc), or how about using ClosedXML as the following?

Using wb As New ClosedXML.Excel.XLWorkbook(filename)
    Dim sheet As ClosedXML.Excel.IXLWorksheet = wb.Worksheet(sheetName)
    sheet.Cell("A1").Comment.AddText("Comment1")
    sheet.Cell("A2").Comment.SetVisible.AddText("Comment2")
    wb.Save()
End Using

Sample
Sample20231020-3a.zip (10.2 KB)

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.