We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Apply ConvertStringToNumericValue to specific column


I try to use ConvertStringToNumericValue on a sheet to convert values within a column to numeric values.
However this method applies to the whole sheet, or ? This should not happy, I only want to convert for example Column 3 to numeric.
How can I do that ?



Thank you for considering Aspose.

Well, you can use the Cell.PutValue(“value”,true) method to input the values as numeric ( or any other suitable datatype) in the cells of your desired column. Please see the following sample code in this regard,

Sample Code:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

//Instantiating an Workbook object

Workbook workbook = new Workbook();

//Obtaining the reference of the newly added worksheet

Worksheet sheet = workbook.Worksheets[0];

Aspose.Cells.Cells cells = sheet.Cells;

//Setting the value to the cells in column 3

for (int i = 0; i < 100; i++)


cells[i, 3].PutValue(""+i, true);


//Saving the Excel file


Thank You & Best Regards,


thanks for the fast response.
This works well for me.

Kind Regards