Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

A Cell object represents a single cell in a worksheet. To return a Cell object use Worksheet.Cells. Specify the cell by 0-based row and column indexes or by Excel-style reference:

{signature}
{example}{code:csharp|title=C#}

          //--- Get Cell by Excel-style reference
          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Worksheet ws = wb.Worksheets[0];
          Cell cellA1 = ws.Cells[0,0];

          //--- Get Cell by Excel-style reference
          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Worksheet ws = wb.Worksheets[0];
          Cell cellA1 = ws.Cells["A1"];
        
{code}
{code:vbnet|title=vb.net
}

          '--- Get Cell by Excel-style reference
          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ws As Worksheet = wb.Worksheets(0)
          Dim cellA1 As Cell = ws.Cells(0, 0)

          '--- Get Cell by Excel-style reference
          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ws As Worksheet = wb.Worksheets(0)
          Dim cellA1 As Cell = ws.Cells("A1")
        
Signature
C#C#
Wiki Markup
{description}
{excerpt}A [Cell|Cell] object represents a single cell in a worksheet. To return a {{Cell}} object use [Worksheet.Cells|Worksheet.Cells].  Specify the cell by 0\-based row and column indexes or by Excel\-style reference:{excerpt}
{signature:C#}
 public sealed class Cell
Signature
{signature}{signature:vb.net
vb.net
}
Public NotInheritable Class Cell
Example
Code Block
csharpcsharp
titleC#
Code Block
vbnetvbnettitle
Properties

...

Name

...

Description

...

ColumnNumber

...

{code}

{example}
{properties}
||Name||Description||
|[ColumnNumber|Cell.ColumnNumber]|{excerpt-include:Cell.ColumnNumber

...

Comment

|nopanel=true}|
|[Comment|Cell.Comment]|{excerpt-include

...

:Cell.Comment

...

ConditionalFormat

|nopanel=true}|
|[ConditionalFormat|Cell.ConditionalFormat]|{excerpt-include

...

:Cell.ConditionalFormat

...

DataValidation

|nopanel=true}|
|[DataValidation|Cell.DataValidation]|{excerpt-include

...

:Cell.DataValidation

...

Formula

|nopanel=true}|
|[Formula|Cell.Formula]|{excerpt-include

...

:Cell.Formula

...

HasComment

|nopanel=true}|
|[HasComment|Cell.HasComment]|{excerpt-include

...

:Cell.HasComment

...

HasConditionalFormat

|nopanel=true}|
|[HasConditionalFormat|Cell.HasConditionalFormat]|{excerpt-include

...

:Cell.HasConditionalFormat

...

HasDataValidation

|nopanel=true}|
|[HasDataValidation|Cell.HasDataValidation]|{excerpt-include

...

:Cell.HasDataValidation

...

IsMerged

|nopanel=true}|
|[IsMerged|Cell.IsMerged]|{excerpt-include

...

:Cell.IsMerged

...

Name

|nopanel=true}|
|[Name|Cell.Name]|{excerpt-include

...

:Cell.Name

...

RowNumber

|nopanel=true}|
|[RowNumber|Cell.RowNumber]|{excerpt-include

...

:Cell.RowNumber

...

Style

|nopanel=true}|
|[Style|Cell.Style]|{excerpt-include

...

:Cell.Style

...

Value

|nopanel=true}|
|[Value|Cell.Value]|{excerpt-include

...

:Cell.Value

...

ValueType

|nopanel=true}|
|[ValueType|Cell.ValueType]|{excerpt-include

...

:Cell.ValueType

...

Methods

...

Name

...

Description

|nopanel=true}|
{methods}
||Name||Description||
|[ApplyStyle(Style)

...

|Cell.ApplyStyle(Style)

...

]|{excerpt-include:Cell.ApplyStyle(Style)

...

|nopanel

...

=true}|
|[ClearContent()

...

|Cell.ClearContent()

...

]|{excerpt-include:Cell.ClearContent()

...

|nopanel

...

=true}|
|[ClearRichTextFormatting()

...

|Cell.ClearRichTextFormatting()

...

]|{excerpt-include:Cell.ClearRichTextFormatting()

...

|nopanel

...

=true}|
|[CreateAnchor(Int32, Int32)

...

|Cell.CreateAnchor(Int32, Int32)

...

]|{excerpt-include:Cell.CreateAnchor(Int32, Int32)

...

|nopanel

...

=true}|
|[CreateHyperlink(String)

...

|Cell.CreateHyperlink(String)

...

]|{excerpt-include:Cell.CreateHyperlink(String)

...

|nopanel

...

=true}|
|[GetCharacters(Int32)

...

|Cell.GetCharacters(Int32)

...

]|{excerpt-include:Cell.GetCharacters(Int32)

...

|nopanel

...

=true}|
|[GetCharacters(Int32, Int32)

...

|Cell.GetCharacters(Int32, Int32)

...

]|{excerpt-include:Cell.GetCharacters(Int32, Int32)

...

|nopanel

...

=true}|
|[RemoveComment()

...

|Cell.RemoveComment()

...

]|{excerpt-include:Cell.RemoveComment()

...

|nopanel

...

=true}|
|[RemoveConditionalFormat()

...

|Cell.RemoveConditionalFormat()

...

]|{excerpt-include:Cell.RemoveConditionalFormat()

...

|nopanel

...

=true}|
|[RemoveDataValidation()

...

|Cell.RemoveDataValidation()

...

]|{excerpt-include:Cell.RemoveDataValidation()

...

|nopanel

...

=true}|
|[SetConditionalFormat(ConditionalFormat)

...

|Cell.SetConditionalFormat(ConditionalFormat)

...

]|{excerpt-include:Cell.SetConditionalFormat(ConditionalFormat)

...

|nopanel

...

=true}|
|[ToString()

...

|Cell.ToString()

...

]|{excerpt-include:Cell.ToString()

...

|nopanel

...

=true}|
|[Unmerge()

...

|Cell.Unmerge()

...

]|{excerpt-include:Cell.Unmerge()

...

|nopanel

...

Classes

...

Name

...

Description

...

CellValueType

...

=true}|
{classes}
||Name||Description||
|[CellValueType|Cell.CellValueType]|{excerpt-include:Cell.CellValueType

...

|nopanel=true}|
{scrollbar}