Convert Text Numeric Data to Number
Aspose.Cells provides the Cells.ConvertStringToNumericValue() method which can be used to convert all string or text numeric data into numbers.
The following screenshot shows string numbers in cells A1:A17. String numbers are aligned to the left.
|Input file: numbers entered as text strings|
These string numbers have been converted to numbers using Cells.ConvertStringToNumericValue() in the following screenshot. As you can see, they are now right-aligned.
|Output file: the strings have been converted to numbers|
C# code to convert string numeric data to actual numbers
The following sample code illustrates how to convert all string numeric data to actual numbers in all worksheets.