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
30
excelExportService
posted

Hi,

we need to export datetime values to excel. The datetime value in the dataobject is ISO 8601 (for example 2020-06-01...) It is possible to render the value in the cell before export? Is there a callback for rendering? I only found the onColumnExport hook. But this is not for rendering the content.

Thanks.

Parents
  • 1080
    Verified Answer
    Offline posted

    Hello,

    Thank you for posting in our community.

    By subscribing to the onRowExport event of IgxExcelExporterService, the date value can be modified before exporting:

    this.excelExportService.onRowExport.subscribe((args: IRowExportingEventArgs) => {  
    	args.rowData.HireDate = args.rowData.HireDate.toISOString();
    });

    I have created a small sample in StackBlitz for your reference. Let me know if that solves your issue.

Reply Children