Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

An anchor represents the position of a floating (non-cell data) object within a spreadsheet. The position is maintained as a row number + a percentage of the row's width and a column number + a percentage of the column's height.

Signature
C#
C#
 public sealed class Anchor
{signature}{signature:
}
Signature
vb.net
vb.net
Public NotInheritable Class Anchor
{signature}
{remarks}To create an [Anchor|Anchor] object, use [Worksheet.CreateAnchor|Worksheet.CreateAnchor(Int32, Int32, Double, Double)] or [Cell.CreateAnchor|Cell.CreateAnchor(Int32, Int32)].

{remarks}
{example}{code:csharp|title=C#}
Remarks

To create an Anchor object, use Worksheet.CreateAnchor or Cell.CreateAnchor.

Example
Code Block
csharp
csharp
titleC#


          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Worksheet ws = wb.Worksheets[0];
          Anchor anc = ws.CreateAnchor(2, 4, 0, 0);
        
{code} {code:vbnet|title=
Code Block
vbnet
vbnet
titlevb.net
}


          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ws As Worksheet = wb.Worksheets(0)
          Dim anc As Anchor = ws.CreateAnchor(2, 4, 0, 0)
        
{code} {example} {properties} ||Name||Description|| |[Column|Anchor.Column]|{excerpt-include:Anchor.Column|nopanel=true}| |[OffsetX|Anchor.OffsetX]|{excerpt-include:Anchor.OffsetX|nopanel=true}| |[OffsetY|Anchor.OffsetY]|{excerpt-include:Anchor.OffsetY|nopanel=true}| |[Row|Anchor.Row]|{excerpt-include:Anchor.Row|nopanel=true}| {scrollbar}
Properties

Name

Description

Column

Excerpt Include
Anchor.Column
Anchor.Column
nopaneltrue

OffsetX

Excerpt Include
Anchor.OffsetX
Anchor.OffsetX
nopaneltrue

OffsetY

Excerpt Include
Anchor.OffsetY
Anchor.OffsetY
nopaneltrue

Row

Excerpt Include
Anchor.Row
Anchor.Row
nopaneltrue
Scrollbar