I'm using Excel export with the Infragistics.Excel library. I'm trying to format the CellFormat.FormatString to display numbers in the sheet the way I want. For sample purposes I'm using the FormatString found in one of your examples
worksheet.Columns[index].CellFormat.FormatString = "\"$\"#,##0.00;[red](\"$\"#,##0.00)";
However this is not working. The cells are not formatted based on this value. In Excel I get an error "the number in this cell is formatted as text or preceded by an apostrophe". When I right-click the cell and see what the formatting is, the CORRECT formatting can be seen as selected. Any idea why Excel still doesn't follow the selected formatting?
Hello,
I have created a sample by using the same format string that you have provided and I am not able to reproduce the issue you mentioned. Attached is the sample I have created and I have followed this link FormatString.
Please send me a sample which reproduces the issue.
Thank you,
Hi Asma,
I am sorry, but I cannot find provided sample as valid Infragistics.SilverLight Sample it seems a windows example furthermore it is missing excel files.
furthernmore, is it possible to get formated value from cell.Value after applying FormatString in runtime from the object instead of after exporting ,
Thanks
Yes, I also got it working. I was just setting the value in wrong type. I had the integer value set as string for the cell and that's why the formatting didn't work. Thanks for the help.