Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 686
Adones Cunha Avatar asked Oct 21 '08 17:10

Adones Cunha


People also ask

How do I automatically insert comments in Excel?

Right-click the cell and then click Insert Comment (or press Shift+F2). If you're using Excel for Office 365, right-click the cell and choose New Note. Type your annotation text. Click outside the cell.

How do you add a comment to an object in Excel?

Right-click the cell and select New Note. Enter your note and click outside the cell.


1 Answers

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://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.excel.range.addcomment

Also see this too

like image 69
kenny Avatar answered Oct 06 '22 01:10

kenny