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
65
Igx Grid - Export to Excel - Number column with currency
posted

Hello,

I have a number column for which I use ng-template with CurrencyPipe to display multiple currencies. Is there a method by which when I export to excel to export also the currencies?

Thanks,

Anca

Parents
No Data
Reply
  • 700
    Verified Answer
    Offline posted

    Hello Anca,

    Thank you for posting to Infragistics Community!

    I have been looking into your question and an approach I could suggest, in order to achieve your requirement, is to subscribe to the rowExporting event of the excelExporter service and format the number column like the following:

    this.excelExportService.rowExporting.subscribe(
        (args: IRowExportingEventArgs) => {
            args.rowData.Rate = this.currencyPipe.transform(
                args.rowData.Rate,
                this.getCurrency(args.rowData),
                'code'
           );
        }
    );
     

    I have prepared a small sample where I am formatting the data of the “Rate” column using CurrencyPipe’s transform method.

    Here could be found my sample for your reference. Please test it on your side and let me know if you need any further information regarding this matter.

    Looking forward to hearing from you.

    Sincerely,
    Riva Ivanova
    Entry Level Software Developer

Children