cancel
Showing results for 
Search instead for 
Did you mean: 

Export Excel with color formatting in sapui5

excel.png

Hi all,

I have a grid table which displays data coming from OData which I want to export in excel having first row after header to be bold and should be highlight. In above excel I want Mumbai row should be bold and highlighted.

Accepted Solutions (1)

Accepted Solutions (1)

Marian_Zeis
Active Contributor

This is not possible in standard ui5.

You have to write the export process completely yourself.

I would recommend SheetJS and ui5-tooling-modules.

0 Kudos

Thanks for the response Marian but user don't want to use any third part application or tools

Marian_Zeis
Active Contributor
0 Kudos

Hi sarvesh_09

Well, then you can try to rewrite SheetJS yourself.

You don´t have any other options.

For the thirdparty application tools:
You using UI5? You already using a lot of third party libraries. The UI5 Team didn´t write everything themself from scratch.

0 Kudos

Hi Marian,

Can u help me for the reference to write sheetjs manually and how to add highlight and do bold for the first row after header?

Marian_Zeis
Active Contributor
0 Kudos

Hi sarvesh_09

using ui5-tooling-modules you can integrate SheetJS in your UI5 App, add a new button to your table.
With this button you trigger creating the Excel File with SheetJS.

The Documentation for SheetJS is here:
https://docs.sheetjs.com/docs/

Hi Marian,

I had achieved this by adding background color in CSS using standard class.

praveenkumar_g2
Explorer
0 Kudos

Hello Sarvesh,

It's great to know that Excel cell highlighting was achieved without SheetJS.
Could you please help with a sample here?

Thanks,
Praveen.

Answers (0)