CellValue.ToString(IFormatProvider) Method
Returns a string representation of the cell value.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
formatProvider | IFormatProvider | An object implementing the IFormatProvider interface. |
Returns
Type | Description |
---|---|
String |
Remarks
Use this method overload to retrieve the cell value as a string with the specified culture settings.
The code sample below retrieves a cell value as a string in the invariant culture:
var workbook = new Workbook();
workbook.LoadDocument(@"C:\Docs\Comments.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
string cellValue =
worksheet["B5"].Value.ToString(CultureInfo.InvariantCulture);
See Also