Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Download colored ALV output in to EXCEL sheet

sarath_7
Participant
0 Kudos

Hi ,

I want to download colored ALV output to Excel sheet with color.

one of the field in ALV is with 4 colors depending on condition.

i am unable to download the color using download option(that field is comming with out color).

Please help me by providing the solution.

Thanks in advance.

Regards

sarath

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sarath,

How are you downloading, are you using the standard function or your own funtion? For this you need to use HTML color options..using HTML you can set the whatever the colors you want when the data gets downloaded..

for ex: if you want to download a string, you put that string in a HTML statement with color settings..you will get lot of information on web on how to use the HTML for colors...

Try this approach, let me know if you don't get it, then i will give you more details..

Thanks

Srini.

13 REPLIES 13

Former Member
0 Kudos

Hi Sarath,

How are you downloading, are you using the standard function or your own funtion? For this you need to use HTML color options..using HTML you can set the whatever the colors you want when the data gets downloaded..

for ex: if you want to download a string, you put that string in a HTML statement with color settings..you will get lot of information on web on how to use the HTML for colors...

Try this approach, let me know if you don't get it, then i will give you more details..

Thanks

Srini.

0 Kudos

Hi Srini,

thanks for the reply.

i am using standard download function only.

if i use download->local file->HTML Format only the font is appearing in colors.in case of spread sheet no color comming.

but my requirement is to download into excel and background also with color(green...) font in black like that.

(exactly appearing in the ALV)

Thanks

sarath

former_member182779
Active Contributor
0 Kudos

You could use Excel OLE...check my blog [Excel OLE and ABAP - Create fancy reports|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13091]

Greetings,

Blag.

0 Kudos

Hi Alvaro,

Thanks, i got to know a new thing.

So for the Sarath's requirement where he will download the data (ALV report data) to excel directly, how can we handle the standard download functionality to get the as it is shown on the ALV report.

Thanks,

Srini.

0 Kudos

Well...he could create a new button on the ALV Toolbar and simply use the Internal Table to get downloaded as Excel OLE.

Greetings,

Blag.

0 Kudos

Hi Alvaro,

thanks for the solution.

I have created the Button and added this OLE functionality .

but it is taking more time to generate Excel sheet,My report contains 12 columns and approximately 1000 records.

For that i need color For only one column (Job status like SM37with bgcolor).i am providing colors to Headers and for that one column only.

is there any way to increase performance as well.

Thanks in Advance.

Sarath

0 Kudos

Hi,

OLE is slow compared to other front end interaction options. We may not get good performance with OLE. May be you can think of HTML format which is as good as normal excel down load with extra options like colours and nice look and feel.

Thanks,

Vinod.

0 Kudos

I agree with Vinod...while OLE is a nice solution and I like it a lot...it can be pretty slow when working with too many records -:( Maybe you should try his solution...also I the link I send you, there are alternate solutions that you could try -;)

Greetings,

Blag.

0 Kudos

Hi Vinod/Alvaro,

Thanks for your solutions,

Yes HTML OK,

But My requirement is Excel.Is there any other option apart from OLE Available.

please advice on this.

Regards

sarath

0 Kudos

sarath,

a simple way..

use local file->HTML only.. but while choosing the file location to save give extension as XLS.

now see what happens...

0 Kudos

Hi...

I tried your solution. But, still colors in ALV Grid not reflecting in Excel file.... I did the same as you said..

0 Kudos

Hi,

I tried Soumyaprakash Mishra suggestion and it works.

Try it again.

Thanks for this new input.

Regards,

iostreamax

0 Kudos

Hi,

Thank You..Its working now. Actually I'm having problem with Excel in my system.