Hi ,
In our application I am using Infragistics.Excel to export the file. But I am not able to apply the Currency format for numeic values. Please how can i specify the currency format.
Ex:- 10,235.00 Ex: 0
Could you please respond soon will be appreciable because this is our immediate requirement and going to production today EOD.
Code snippet:-
Right now I am converting the value to string and applying the format. This cause the different problems. so please let me know the proper solution. If provide the sample application to me will be great helpful to me...
if (value != null && value.ToString() == "0") cell.Value = value.ToString(); else cell.Value = string.Format("{0:0,0}", value); cell.CellFormat.VerticalAlignment = VerticalCellAlignment.Center; cell.CellFormat.Alignment = HorizontalCellAlignment.Right;
The default currency format in Excel is this: $#,##0.00
Set this on the cell.CellFormat.FormatString property.
Mike,
Thanks for your Quick response.I have applied the following format.
cell.Value = value; cell.CellFormat.FormatString = "#,##0;(#,##0);0";
It is working fine. But now its not working for %. Could you please paste me the format string for Percentage.
Thanks
Anil Kumar