Guide for VB.NET
Core Document Formats
Excel Annotation
Additional Features

VB.NET Excel - Draw Annotation on Excel

How to Draw and Add Annotations on Excel Spreadsheet in VB Class

VB.NET
Home > .NET Imaging SDK > VB.NET > Excel Annotation
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

Our VB.NET Excel Annotating Control from Excel Reading SDK for VB.NET enables developers to add and burn various kinds of annotations on target Excel document page (worksheet), including callout, ellipse, hotspot, rubber stamp, etc. Look at the following questions to know more about how to make annotations on Excel document page in VB.NET.
Related .net document control helps:
asp.net edit pdf page using c#: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net mvc word viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net pdf viewer using c#: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
c# asp.net excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
c# asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net view powerpoint: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
  • What APIs can be used to draw annotations on Excel document worksheet in VB.NET application?
  • What VB.NET demo codes can be used to annotate target Excel document spreadsheet?
  • What makes our VB.NET Excel Annotating Control so popular among VB.NET developers?
In the following sections of this VB.NET tutorial page, you will get detailed APIs and VB.NET demo codes for creating and burning annotations on Excel document worksheet. You will also know about main mature features of our VB.NET Excel Annotating Control.
APIs for Excel Annotating
For VB.NET developers who want to easily add annotations on certain Microsoft Excel document worksheet, the following APIs would not more suitable. Using these APIs, VB.NET developers are able to add and burn annotations to target Excel worksheet at specified position. In order to specify the position, developers only need to set coordinates of the position because Excel coordinates and scaling is completely implemented in the annotation burning process. And you are also able to specify annotation size in local settings.
Private Function AddFloatingItem(item As BaseItem) As Integer Implements XLSXPage.AddFloatingItem
End Function
Private Sub MergItemsToPage() Implements XLSXPage.MergItemsToPage
End Sub
Please pay attention that we use XLSXDocument and XLSXPage to represent one Excel file and one Excel worksheet in our VB.NET program respectively. The XLSXDocument contains information of all worksheets and the XLSXPage class includes all information and formatting of the original Excel worksheet. Each worksheet is treated as one page in our VB.NET Excel annotating programming.
VB.NET Demo Codes
As this VB.NET Excel Annotating Control allows for generating and adding more than ten kinds of annotations on Excel document worksheet, we cannot expand all VB.NET demo codes here. You may need to click to expand wanted section to get specific demo code. VB.NET demo codes for creating callout, embedded image, ellipse, free hand, free hand line, hotspot, free hand hotspot, line, lines, rectangle, rubber stamp and text annotations are provided free of charge.
Add Callout Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn a callout annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New CalloutAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Create Embedded Image Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn an embedded image annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New EmbeddedImageAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Insert Ellipse Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn an ellipse annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New EllipseAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Generate Free Hand Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn a free hand annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New FreeHandAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Draw Free Hand Line Annotation on Excel in VB
''' <summary>
''' Draw and burn a free hand line annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New FreeHandLineAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Annotate Excel with Hotspot in VB
''' <summary>
''' Draw and burn a hotspot annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New HotspotAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Add Hotspot Free Hand Annotation on Excel Page in VB
''' <summary>
''' Draw and burn a free hand hotspot annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New FreeHandHotspotAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Annotate Excel with Line in VB
''' <summary>
''' Draw and burn a line annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New LineAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Generate Lines Annotation on Excel Spreadsheet in VB
''' <summary>
''' Draw and burn lines annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New LinesAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Create Rectangle Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn a rectangle annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New RectangleAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Annotate Excel Sheet with Rubber Stamp in VB
''' <summary>
''' Draw and burn a rubber stamp annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New RubberStampAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub
Draw Text Annotation on Excel Sheet in VB
''' <summary>
''' Draw and burn a text annoation on the first page of an Excel document.  
''' </summary>
Public Shared Sub ExcelAnnotation(filePath As [String], pageIdx As Integer, annotatedFilePath As [String])
	Dim doc As New XLSXDocument(filePath)
	Dim newPage As BasePage = doc.GetPage(0)

	Dim obj As New TextAnnotation()
	' set annotation size 
	obj.X = 470F
	obj.Y = 420F
	obj.Width = 561F
	obj.Height = 228F

	'set annotation edge property
	obj.OutLine = New LinePen()
	obj.OutLine.Width = 5F
	'set annotation edge width
	obj.OutLine.Brush = New AnnotationBrush()
	obj.OutLine.Brush.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set annotation edge style
	obj.OutLine.Brush.Solid_Color = Color.Blue
	'set annotation edge color
	'set the property of filled shape
	obj.Fill = New AnnotationBrush()

	obj.Fill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set filled shape style
	obj.Fill.Solid_Color = Color.Gray
	'set filled shape color
	'set the property of shadow
	obj.ShadowFill = New AnnotationBrush()
	obj.ShadowFill.FillType = RasterEdge.Imaging.Annotation.FillType.Solid
	'set shadow style
	obj.ShadowFill.Solid_Color = Color.DarkGreen
	'set shadow color
	obj.ShadowX = 10F
	'set shadow position
	obj.ShadowY = 12F
	obj.ShowShadow = True
	'show shadow or not
	obj.SetTransparency(0.5F)

	Dim item As RasterEdge.Imaging.Drawing.REItemEx = obj.CreateAnnotationItem(newPage)
	newPage.AddFloatingItem(item)

	newPage.MergeItemsToPage()

	doc.Save(annotatedFilePath)
End Sub

Popularity of Excel Annotating SDK
Our VB.NET Excel Annotating Control has gained high popularity among VB.NET developers because of its advanced and mature features.

High .NET Compatibility

Written in the 100% managed Visual C#, our .NET Excel Annotating Control for VB.NET is specifically designed for .NET Framework applications and it is completely compatible with .NET Framework 2.0, 3.0, 3.5, 4.0 or 4.5. It supports 32-bit or 64-bit developing application for drawing annotations on Excel document worksheet.

Multiple Annotation Types

Over ten annotations types can be added on Microsoft Excel document page through VB.NET programming with our Excel Annotating Control for VB.NET. If you want to create a transparent rectangle graph on your Excel document page, you can achieve it by adding rectangle annotation. If you want to leave comment on certain Excel worksheet, you may add text annotation.

Independent Annotating Function

VB.NET developers are capable of creating and burning desired annotations on Excel document worksheet independently from other external assemblies, such as component from Microsoft Office. As our product functions are integrated into a simple dll (RasterEdge.Imaging.MSExcel.dll), you just need to add the dll to your VB.NET project reference to realizing Excel page annotating.

Special Annotating Feature

Once an annotation is added to target Excel document page by using our VB.NET Excel Annotating Control, the annotation is just appended to specified location of the Excel document page. There is totally no influence on the rest of the Excel document.


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com