Sum of column

Hi I am trying do sum of a column which has looks like the following.

$3.20

$12.20

I get the answer as zero. My formuala works for other columns which are just numbers.

How can i solve the above mentioned problem..

Also how do i convert a cell or a range of cells to number?

Thanks

To Convert a cell to number, please try:

cell.PutValue(cell.StringValue, true);

Hi Laurence,

Thanks for the reply.

I use the importdatatable function for importing the data into excel. So i cannot use the putvalue method.

Thanks,

Please try this attached version with the following method:

public int ImportDataTable(DataTable dataTable, bool isFieldNameShown, int firstRow, byte firstColumn, bool insertRows, bool convertStringToNumber)

Hi Laurence,

Thanks for that!!!

We have bought a licence for aspose cells. Is this dll going to work with the license?

Paresh

Hi Paresh,

Thanks for purchasing Aspose.Cells.

Yes. The dll will work with the license. And you can download v3.7.2 at www.aspose.com/downloads. It includes some new enhancements.