Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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#
Wiki Markup
{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.{excerpt}
{signature:C#}
 public sealed class Anchor
Signature
{signature}{signature:vb.net
vb.net
}
Public NotInheritable Class Anchor
Remarks

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

{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#}

          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=vb.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)
        
Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle
Properties

...

Name

...

Description

...

Column

...

{code}

{example}
{properties}
||Name||Description||
|[Column|Anchor.Column]|{excerpt-include:Anchor.Column

...

OffsetX

|nopanel=true}|
|[OffsetX|Anchor.OffsetX]|{excerpt-include

...

:Anchor.OffsetX

...

OffsetY

|nopanel=true}|
|[OffsetY|Anchor.OffsetY]|{excerpt-include

...

:Anchor.OffsetY

...

Row

|nopanel=true}|
|[Row|Anchor.Row]|{excerpt-include

...

:Anchor.Row

...

|nopanel=true}|

{scrollbar}