What is the best way to embed cell comments in excel 2007 files programmatically using C # and .net 3.5?
I just did just 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 a similar method. Consider this from MSDN:
http://msdn.microsoft.com/es-es/library/microsoft.office.interop.excel.range.addcomment.aspx
Also see this
The accepted answer points are in the right direction, but the correct syntax is:
Excel.Range cell; cell.AddComment("My comment");
Have you tried using VSTO? You can easily download and manage an Excel document. To add a comment to a cell, upload the file, activate the worksheet, then select the cell as a range and set the comment.
Excel._Worksheet oSheet = (Microsoft.Office.Interop.Excel._Worksheet) excelWorkbook.ActiveSheet; oSheet.Cells[2, 3].Cells.AddComment("Selam");