Forums     Knowledge Base     OfficeWriter Online     
 
This documentation is for
OfficeWriter v3.0.4
.NET Platform

View Docs for Another
Version or Platform

Programmer's Reference > ExcelApplication API > Cell > Formula

Formula Property


C# Signature:

VB.NET Signature:


Description:

Sets or returns a cell formula. If no formula is associated with the cell, the property returns an empty string.

Formula is a read / write property.



Examples:

[csharp]
// Get CellFormula
CellFormula cf = cellA1.Formula;

// Set CellFormula
cellA1.Formula = "=SUM(A1:A2)";
[vbnet]
' Get CellFormula
Dim cf As CellFormula = cellA1.Formula

' Set CellFormula
oCell.Formula = "=SUM(A1:A2)"


Getter

Signature:

public String Formula

Returns:

String A string representation of the cell's formula (e.g., "=SUM(A1:A2)"), or an empty string if a formula was not assigned to the cell.

Setter

Signature:

public void Formula String formula

Type:

String



Copyright 2005 © SoftArtisans, Inc. All Rights Reserved.