Skip to Content
avatar image
Former Member

Colored rows while Export to Excel in SAPUI5

Hi,

I created Export to Excel functionality as mentioned in below SAPUI5 Explored functionality -

https://sapui5.hana.ondemand.com/1.38.5/explored.html#/sample/sap.m.sample.TableExport/preview

But I need to add background color for some of the excel cells, like table headings and some text. Any pointers on how to achieve this?

I referred some blogs as well but it didn't work -

https://blogs.sap.com/2014/11/20/exporting-to-excel-from-sapmtable/

https://blogs.sap.com/2014/01/07/export-sapuitabletable-as-csv/

https://blogs.sap.com/2015/04/07/export-to-excel-customization-in-ui5/

Any kind of help will be highly appreciated.

Thanks & Regards,

Saurabh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jul 06, 2017 at 07:41 AM

    Hi ,

    You need to provide inline styling(background color) to the sap.m.table row to get the same styling in excel ..

    Thanks

    Viplove

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member VIPLOVE KHUSHALANI

      Yes, even I referred this and trying to implement my requirements.

      This is doing the trick but throwing file format issues while opening the excel.

      But once I open the excel, I can see my content in desired way.

      Thanks,

      Saurabh

      excel-issue.jpg (28.5 kB)
  • avatar image
    Former Member
    Jul 15, 2017 at 02:31 AM

    Use can use addStyleclass() on the control as we

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Devender,

      Method addStyleClass() did not work in excel. It worked on-screen though.

      Thanks,

      Saurabh

  • Sep 05 at 01:30 PM

    Hi,

    Could you please let me know what is the solution to make rows to bold and highlight the background color to blue only for the rows.

    Very much urgent.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded