I have to format currency in Excel in this format within the double quotes "_($* #,##0.000_);_($* (#,##0.000);_($* " - "??_);_(@_)".
After applying the aspose styles to the required excel columns successfully, I get a warning message when opening the excel "Excel found unreadable content. Do you want to recover the contents of this workbook." Please advise?
Style ColumnDateStyle = null;
StyleFlag ColumnDateStyleFlg = null;
ColumnDateStyleFlg = new StyleFlag() { All = false };
ColumnDateStyleFlg.HorizontalAlignment = true;
ColumnDateStyleFlg.NumberFormat = true;
ColumnDateStyle.Custom = "_($* #,##0.000_);_($* (#,##0.000);_($* \"-\"??_);_(@_);";
foreach (DataColumn col in dtDataTable.Columns)
{
wsXLSWorksheet.Cells.Columns[col.Ordinal].ApplyStyle(ColumnDateStyle, ColumnDateStyleFlg);
}