Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2092
Formatting not applied
posted

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?