We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

In gantt chart edit task pop-up, Notes tab can have various styles applied to text, while exporting that styles are not retaining in excel.

In gantt chart edit task pop-up, Notes tab can have various styles applied to text, while exporting that styles are not retaining in excel.

Suppose i have written "Hello​" in bold in Notes Tab, but while export i can see "<strong>Hello</strong>".

Format styles are not applied in excel export.

Please give me a solution for the same.


1 Reply

GM Gopinath Munusamy Syncfusion Team January 12, 2023 04:24 AM UTC

Hi Donika,


Currently, we don’t have support to export HTML elements to the excel file. We logged a feature task for your requirement as “Support for exporting HTML grid data into Excel document” and added it to our feature request database. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technical feasibility, and customer interest. This feature will be included in any of our upcoming releases. You can track the status of the feature from the feedback link given below.

Feedback Link: https://www.syncfusion.com/feedback/7058/support-for-exporting-html-grid-data-into-excel-document


However, We suggest you use the excelQueryCellInfo event to customize the data before exporting it. For your reference, a sample and a code snippet are attached. Check the below sample and code snippets for more details.

Code Snippets:

[app.component.html]

<ejs-gantt #gantt id="GanttExport"

    (excelQueryCellInfo)="excelQueryCellInfo($event)">

 

[app.component.ts]

public excelQueryCellInfo(args) {

    if (args.column.field === 'info') {

      args.value = (args.value as any).replace(/(<([^>]+)>)/gi, '');

      if (args.value == 'Hello') {

        args.style = { bold: true };

      }

    }

  }


Sample https://stackblitz.com/edit/angular-skxrs7-awjzpr?file=app.component.ts,app.component.html,data.ts


UG Documentation: https://ej2.syncfusion.com/angular/documentation/api/gantt#excelquerycellinfo


Regards,

Gopinath M



Loader.
Live Chat Icon For mobile
Up arrow icon