Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Sometimes, you want to convert numeric data entered as text to numbers. You can enter numbers as text in Microsoft Excel by putting an apostrophe before a number, for example ‘12345. Excel then treats the number as a string. Aspose.Cells allows you to convert strings to numbers.
You can convert numbers stored as text to numbers by following a few simple steps.




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.

These string numbers have been converted to numbers using Cells.ConvertStringToNumericValue() in the following screenshot. As you can see, they are now right-aligned.

The following sample code illustrates how to convert all string numeric data to actual numbers in all worksheets.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.