7

Excel download in SAPUI5 application with custom formatting

 2 years ago
source link: https://blogs.sap.com/2021/11/20/excel-download-in-sapui5-application-with-custom-formatting/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
November 20, 2021 Less than a 1 minute read

Excel download in SAPUI5 application with custom formatting

0 2 105

GitHub repository:

https://github.com/miltonchandradas/excel.git (SAPUI5 application)

https://github.com/miltonchandradas/ExcelHTML5.git (HTML5 application)

Introduction:

  • In this session, we will look at how we can download table data in Excel with custom formatting
  • SAPUI5 framework has support for Excel download – but comes with minimal formatting options
  • We can achieve any kind of custom formatting with HTML5, CSS and JavaScript

Excel%20with%20custom%20formatting

Excel with custom formatting

Synopsis:

  • To achieve this custom formatting, we can use HTML5, CSS and JavaScript
  • Basically, we need to manipulate the DOM structure and add an <a> tag to it
  • The href attribute of the <a> tag will hold the outerHTML of the table element
  • And with the help of a simple utility function, we can download the table with custom formatting

YouTube Link:

Conclusion:

  • This workaround will allow us to download table data in Excel with custom formatting
  • This workaround is not supported by SAP
  • The Excel file downloaded in this manner will have a warning message
  • If you have questions or comments, please list them below and I will be happy to answer

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK