cancel
Showing results for 
Search instead for 
Did you mean: 

Export to Excel - Custom button

sri_ram18
Participant
0 Kudos

Hi,

We have a requirement where the user needs a custom Excel sheet having Header has to be in a different colour.

Excel sheet will be imported to Desktop from SAP ALV Web Dynpro Custom Export to Excel Button.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member201275
Active Contributor
0 Kudos

There are many ways to do this, and also this is really an FAQ.

There is a sap demo i.e. SALV_WD_DEMO_EXTENDED

and also many links for example which explain your requirement:

http://wiki.scn.sap.com/wiki/display/WDABAP/Creating+an+ALV+List+in+Web+Dynpro+Application

ramakrishnappa
Active Contributor
0 Kudos

Hi Sriram,

Create a custom tool bar button in alv and read the data of context node into an internal table and follow the below document to export to excel file with formatted cells.

Hope this helps you.

Regards,

Rama

sri_ram18
Participant
0 Kudos

Hi Rama,

I have a standard ALV table. So i added the custom export to excel button,data is displayed correctly,but the requirement is to get the Header in a unique colors.

The link provided by you is for normal table having a cutom button.

Thanks,

Sriram.

ramakrishnappa
Active Contributor
0 Kudos

Hi Sriram,

Yes, the link which I provided explains the steps involved in achieving your requirement for table but you can also use it for alv as well.

You need to get data from context node and process as normal table.

Regards,

Rama

former_member206479
Participant
0 Kudos

Sriram,

Why don't you place your code in the event handler method of ON_FUNCTION event of alv? Did you try like that.

Thanks

Venkat.

sri_ram18
Participant
0 Kudos

Hi Venkat,

We did based on ON_Function Event.. The required data in Excel sheet is perfect.. only thing which is lagging is the Header row which has to be displayed in unique color...

Any Ideas on this..

Thanks.