Microsoft® Excel comments insertion via .NET

Create Excel documents and insert comments using server-side APIs in .NET-based applications.


You can add comments to cells. When a cell has a comment, an indicator appears in the corner of the cell. Comments appear when you hover your cursor over a cell.These comments can be used for discussion, special instructions, or markup of document content.The .NET Excel Library supports inserting comments in Excel files.For this, the API provides a Comment class for comments building block.

Insert comments in Excel File

Insertting comments using Excel API is simple. Process is, Create Workbook class object and select the first worksheet or the relevant sheet by providing its index. Insert the required cells data using PutValue method . Add comment to the worksheet by using CommentCollection ’s Add method .

C# Code to Insert Comment in Excel