Convert Text Numeric Data to Number

Contents
[ ]

Aspose.Cells for Java API 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

todo:image_alt_text

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

todo:image_alt_text

The following sample code illustrates how to convert all string numeric data to actual numbers in all worksheets.