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

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
C#
C#
 public sealed class Cell
{signature}{signature:
}
Signature
vb.net
vb.net
Public NotInheritable Class Cell
{signature}
{example}{code:csharp|title=C#}
Example
Code Block
csharp
csharp
titleC#


          //--- 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=
Code Block
vbnet
vbnet
titlevb.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")
        
{code} {example} {properties} ||Name||Description|| |[ColumnNumber|Cell.ColumnNumber]|{excerpt-include:Cell.ColumnNumber|nopanel=true}| |[Comment|Cell.Comment]|{excerpt-include:Cell.Comment|nopanel=true}| |[ConditionalFormat|Cell.ConditionalFormat]|{excerpt-include:Cell.ConditionalFormat|nopanel=true}| |[DataValidation|Cell.DataValidation]|{excerpt-include:Cell.DataValidation|nopanel=true}| |[Formula|Cell.Formula]|{excerpt-include:Cell.Formula|nopanel=true}| |[HasComment|Cell.HasComment]|{excerpt-include:Cell.HasComment|nopanel=true}| |[HasConditionalFormat|Cell.HasConditionalFormat]|{excerpt-include:Cell.HasConditionalFormat|nopanel=true}| |[HasDataValidation|Cell.HasDataValidation]|{excerpt-include:Cell.HasDataValidation|nopanel=true}| |[IsMerged|Cell.IsMerged]|{excerpt-include:Cell.IsMerged|nopanel=true}| |[Name|Cell.Name]|{excerpt-include:Cell.Name|nopanel=true}| |[RowNumber|Cell.RowNumber]|{excerpt-include:Cell.RowNumber|nopanel=true}| |[Style|Cell.Style]|{excerpt-include:Cell.Style|nopanel=true}| |[Value|Cell.Value]|{excerpt-include:Cell.Value|nopanel=true}| |[ValueType|Cell.ValueType]|{excerpt-include:Cell.ValueType|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=true}| {classes} ||Name||Description|| |[CellValueType|Cell.CellValueType]|{excerpt-include:Cell.CellValueType|nopanel=true}| {scrollbar}
Properties

Name

Description

ColumnNumber

Excerpt Include
Cell.ColumnNumber
Cell.ColumnNumber
nopaneltrue

Comment

Excerpt Include
Cell.Comment
Cell.Comment
nopaneltrue

ConditionalFormat

Excerpt Include
Cell.ConditionalFormat
Cell.ConditionalFormat
nopaneltrue

DataValidation

Excerpt Include
Cell.DataValidation
Cell.DataValidation
nopaneltrue

Formula

Excerpt Include
Cell.Formula
Cell.Formula
nopaneltrue

HasComment

Excerpt Include
Cell.HasComment
Cell.HasComment
nopaneltrue

HasConditionalFormat

Excerpt Include
Cell.HasConditionalFormat
Cell.HasConditionalFormat
nopaneltrue

HasDataValidation

Excerpt Include
Cell.HasDataValidation
Cell.HasDataValidation
nopaneltrue

IsMerged

Excerpt Include
Cell.IsMerged
Cell.IsMerged
nopaneltrue

Name

Excerpt Include
Cell.Name
Cell.Name
nopaneltrue

RowNumber

Excerpt Include
Cell.RowNumber
Cell.RowNumber
nopaneltrue

Style

Excerpt Include
Cell.Style
Cell.Style
nopaneltrue

Value

Excerpt Include
Cell.Value
Cell.Value
nopaneltrue

ValueType

Excerpt Include
Cell.ValueType
Cell.ValueType
nopaneltrue
Methods

Name

Description

ApplyStyle(Style)

Excerpt Include
Cell.ApplyStyle(Style)
Cell.ApplyStyle(Style)
nopaneltrue

ClearContent()

Excerpt Include
Cell.ClearContent()
Cell.ClearContent()
nopaneltrue

ClearRichTextFormatting()

Excerpt Include
Cell.ClearRichTextFormatting()
Cell.ClearRichTextFormatting()
nopaneltrue

CreateAnchor(Int32, Int32)

Excerpt Include
Cell.CreateAnchor(Int32, Int32)
Cell.CreateAnchor(Int32, Int32)
nopaneltrue

CreateHyperlink(String)

Excerpt Include
Cell.CreateHyperlink(String)
Cell.CreateHyperlink(String)
nopaneltrue

GetCharacters(Int32)

Excerpt Include
Cell.GetCharacters(Int32)
Cell.GetCharacters(Int32)
nopaneltrue

GetCharacters(Int32, Int32)

Excerpt Include
Cell.GetCharacters(Int32, Int32)
Cell.GetCharacters(Int32, Int32)
nopaneltrue

RemoveComment()

Excerpt Include
Cell.RemoveComment()
Cell.RemoveComment()
nopaneltrue

RemoveConditionalFormat()

Excerpt Include
Cell.RemoveConditionalFormat()
Cell.RemoveConditionalFormat()
nopaneltrue

RemoveDataValidation()

Excerpt Include
Cell.RemoveDataValidation()
Cell.RemoveDataValidation()
nopaneltrue

SetConditionalFormat(ConditionalFormat)

Excerpt Include
Cell.SetConditionalFormat(ConditionalFormat)
Cell.SetConditionalFormat(ConditionalFormat)
nopaneltrue

ToString()

Excerpt Include
Cell.ToString()
Cell.ToString()
nopaneltrue

Unmerge()

Excerpt Include
Cell.Unmerge()
Cell.Unmerge()
nopaneltrue
Classes

Name

Description

CellValueType

Excerpt Include
Cell.CellValueType
Cell.CellValueType
nopaneltrue
Scrollbar