Sets the Value and Style properties of a cell.

Namespace:  C1.Silverlight.Excel
Assembly:  C1.Silverlight.Excel.5 (in C1.Silverlight.Excel.5.dll)

Syntax

C#
public void SetValue(
	Object value,
	XLStyle style
)
Visual Basic
Public Sub SetValue ( _
	value As Object, _
	style As XLStyle _
)

Parameters

value
Type: System..::..Object
New cell value.
style
Type: C1.Silverlight.Excel..::..XLStyle
New cell style.

Remarks

This method allows you to set the Value and Style properties of a cell simultaneously. This can make your code more compact and easier to maintain. For example:
Copy CodeC#
// set cell value and style (short version)
sheet[0,0].SetValue("Hello", styleBold);

// set cell value and style (longer version)
sheet[0,0].Value = "Hello";
sheet[0,0].Style = styleBold;

See Also