C#: Online Guide
How To: excel SDK
Annotate Excel
  |  
Home ›› XDoc.Excel ›› C# Excel: Annotate Excel

C# Excel - Annotate Excel File Page in C#.NET


Annotate Excel Document Page in C# Project



Related .net document control helps:
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
c# asp.net iis document viewer: C# HTML5 Viewer: Deployment on IIS
c# asp.net dnn document viewer: DNN Document Viewer Control: view, annotate, redact, convert documents in dotnetnuke ASP.NET
c# asp.net excel document viewer: ASP.NET Excel Document Viewer in C# Control: view office excel files online in ASP.NET web applications
c# asp.net tiff document viewer: ASP.NET Tiff Document Viewer: view, annotate Tiff files in HTML using C# Control
asp.net redact pdf using c#: ASP.NET Redact PDF Document Control: redact, remove PDF text, images in web browser using C# ASP.NET
c# asp.net document viewer: ASP.NET Document Viewer Control in C#: View, Annotate, Redact web document files in ASP.NET using C#


Overview



RasterEdge XDoc.Excel Library provides some methods for developers to annotate on Excel file pages. While, in order to add various annotations, you will add reference RasterEdge.Imaging.Annotation to your project.


Types of comments supported as follows:


Rectangle


Ellipse


Line


Freehand


Freehand Lines


Text


Rectangular Hot Spot


Freehand Hot Spot


Embedded Image


Referenced Image


polygon


Lines


Rubber Stamp


Callout


Arrow


Signature




Add Annotation to Excel File Page Using C#



Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.Excel.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.Imaging.Annotation.dll


Using namespace:


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.Excel;


  using RasterEdge.Imaging.Annotation;


  using RasterEdge.Imaging.Annotation.Basic;


  using System.Drawing;


Add rubber stamp annotation to Excel file page using C#.




XLSXDocument doc = new XLSXDocument(@"C:\1.xlsx");
BasePage page = doc.GetPage(0);
Font font = new Font("Arial", 15F);
AnnotationBrush brush = new AnnotationBrush();
AnnotationHandler annotation = AnnotationGenerator.CreateRubberStampAnnotation(10, 10, 100, 100, "Good", font, brush);
page.AddAnnotation(annotation);
doc.Save(@"C:\1anno.xlsx");