The format of cell value does not change in the excel generated using aspose

I am unable to change the format of the cells in the generated excel (i,e) I have a cell value in general format.When I give excel format cell to currency, it doesnt change the value to the format. But when I try to edit the value or just click on the formula bar, the new format gets reflected in the cell.
Please let us know if there is any solution or is it excel behaviour

@aishsri,

Thanks for providing us details.

Well, this might be due to the fact that you are inserting string/text to cells (or your so called numeric data are stored as text/string in the cells of the worksheet). You got to make sure that you have input numeric values (or you have converted the text value to numeric value) while inserting/ importing into cells via Aspose.Cells APIs. In MS Excel, you can apply numbers/currency formatting if your data is in numeric data type.

Take an example below. See the two lines of code with comments for your reference:
e.g
Sample code:

..........
cell.PutValue("123");//This will be inserted as text/string and you cannot apply currency formatting until the data is converted to numbers.

cell.PutValue(123);//This will be inserted as numeric data and the applied formatting would be taken effect fine.

Let us know if you still have any confusion or issue.