Hello,
I am using the header property to set the header in the Excel export.
1. How can I make the Excel report header bold?
2. I also see it spans 10 columns instead of all columns of the report? Can we change that to span the full report?
3. Can we make the background color white for the header in Excel?
4. Can we apply styles to custom fields in the Excel export?
Thanks
Sri
Hello Sri,
Thank you for writing to us.
Please note that Flexmonster's exportTo API call does not support such advanced customizations of headers when using regular Excel export. To implement the described customizations, we suggest exporting with the destinationType parameter set to "plain". This allows passing the exported Excel to a callback handler as a Uint8Array. Through this handler, it is possible to customize the exported grid, using a third-party library for working with Excel in JS.
We have prepared a basic JSFiddle example, illustrating how to export grid data to Excel with destinationType: "plain" using the XLSX library: https://jsfiddle.net/flexmonster/02gqkLcm/
Further sheet header and grid customizations are expected to be handled on your side, with Flexmonster providing the data with the header as a foundation.
Please let us know if this approach would work for you.
Best regards,
Maksym