Format columns in excel export
Question
Is it possible to apply a formatter or similar to columns in the excel export? For instance in the export below, I would like to apply different colors for the Status column, based on Passed or Failed values, and also the date/time column has a rather unfortunate formatting (and is in addition formatted as General and not Date by Excel, even though the exported column did contain dates)

- igniteui-angular version: 7.3.2
- browser: Chrome
@Eralmidia, currently we support exporting data as formatted in the grid. So in order to have different data formatter you may apply some custom formatter on a date column, and the exporter would automatically pick it up.
<igx-column field="OrderDate" width="200px" [dataType]="'date'" [hasSummary]="false" [sortable]="true" [formatter]="dateFormat">
...
dateFormat(val: Date) {
const options = { weekday: 'short', year: 'numeric', month: 'long', day: 'numeric' };
return new Intl.DateTimeFormat('us', options).format(val);
}
As for applying formatting in the actual exported worksheet, you will need to use the excel library instead of this simple exporter feature.
@astaev Thanks for the clarifications 👍