Skip to Content
0
Jan 20, 2014 at 08:50 AM

How to export SAPUI5 form to Excel ?

473 Views

Hi,

In my Project I have created one form to display all data regarding Employee.

The Sample structure of Form is like below.

Now my problem is when click on button I want to export this form into Excel Form.

To get the something like this I used below code.

window.open('data:application/vnd.ms-excel,' + encodeURIComponent($('#dvData').html()));

I am getting Excel sheet but not in that format.

In my Excel I got two problems.

  • 1. The width of cells increased based on the data in that cell.(I am not getting the width on that Form)
  • 2. In that form we have two tables.
    • One is having 6 columns
    • Second one is having 7 columns

How to get these Two tables with in Same width ?

How to get the External css also to get the Form like that?

I am getting columns with same width from top to bottom.But in my Form It is totally different. Is it possible to get the Excel sheet like that?

Please help me .

Thanks&Regards
Sridevi

Attachments

Form.jpg (41.0 kB)