Book1.zip (6.0 KB)
hi,
I am facing weird issue. I have currency values to display in Excel. I am getting value as text from third party application and I am printing those values in excel as it is.
After that I convert that to Custom format giving Currency format string displayed below.
Problem is I am getting all values shown as custom but I am unable to perform any calculation on them. Looks like it is still text. Also when I F2 on particular cell and do nothing just press enter it comes up perfectly fine.
Attached is the file which is generated with my code.
Code:
string sFormat = “$#,##0.00;-$#,##0.00”;
Aspose.Cells.Range oRange = _oSheetCollection[sSheetName].Cells.CreateRange(oXlsRange.FirstRow, oXlsRange.FirstColumn, oXlsRange.RowNum, oXlsRange.ColNum);
Aspose.Cells.Style oStyle = _oSheetCollection[sSheetName].Cells[oXlsRange.FirstRow, oXlsRange.FirstColumn].GetStyle();
oStyle.Custom = sFormat;
Aspose.Cells.StyleFlag flag = new Aspose.Cells.StyleFlag();
flag.All = true;
oRange.ApplyStyle(oStyle, flag);
Please help.
Thanks,
Hetal