Syncfusion.XlsIO.Base
Example 


Value Property (IRange)

Gets or sets the value of the Range. Does not support FormulaArray value.
Syntax
'Declaration
 
Property Value As String
'Usage
 
Dim instance As IRange
Dim value As String
 
instance.Value = value
 
value = instance.Value
string Value {get; set;}
Remarks

Sets different data types values as a string, Value property parses the input string to determine its type which leads performance delay.

The only difference between the Value2 property and the Value property is that the Value2 property does not use the Currency and Date data types. Also, it does not support FormulaArray value.

Example
The following code illustrates how to set and access Value property of the Range.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Create(1);
            
IWorksheet sheet = workbook.Worksheets[0];
IRange range= sheet.Range[3, 1];
range.Value = "1/1/2015";
range.NumberFormat = "dd-MMM-yyyy";
string displayText = range.DisplayText;
            
workbook.SaveAs("Value.xlsx");
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also