Search code examples
c#excel.net-3.5openxml

Insert cell comments in excel programmatically


What's the better way to insert cell comments in excel 2007 files programmatically using c# and .net 3.5?


Solution

  • I just did exactly that but with MS Word (using Microsoft.Office.Interop.Word

    range.Comments.Add ( range, ref _categoryMessage );

    So, I would suggest using Microsoft.Office.Interop.Excel and the similar method. Consider this from MSDN:

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.office.interop.excel.range.addcomment

    Also see this too