Get Cell String Value with and without Formatting with Golang via C++
Contents
[
Hide
]
Aspose.Cells provides a method Cell::GetStringValue() which can be used to get the string value of a cell with or without any formatting. Suppose you have a cell with the value 0.012345 and you have formatted it to display two decimal places only. It will then display as 0.01 in Excel. You can retrieve string values both as 0.01 and as 0.012345 using the Cell::GetStringValue() method. It takes the CellValueFormatStrategy enum as a parameter, which has the following values:
- CellValueFormatStrategy::CellStyle
- CellValueFormatStrategy::DisplayStyle
- CellValueFormatStrategy::DisplayString
- CellValueFormatStrategy::None
The following sample code demonstrates the use of the Cell::GetStringValue() method.