Application Development and Automation 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: 
Read only

ALV export to Excel problem

Former Member
0 Likes
742

Hello experts,

My ALV is displaying 50 columns but when I export it to Excel, 4 columns are coming on the next row and the data are being merged..

How to solve this problem??

Thanks

Ally

Hello experts,

My ALV is displaying 50 columns but when I export it to Excel, 4 columns are coming on the next row and the data are being merged..

How to solve this problem??

Thanks

Ally

4 REPLIES 4
Read only

naveen_inuganti2
Active Contributor
0 Likes
643

Hi,

If you are doing this with standard icon provided by SAP, check it once if the same thing happening with other's system also. because I suspect you excel settings!

-Naveen.I

Read only

0 Likes
643

Hi naveen,

I run the programme on several systems but its the same

Read only

Former Member
0 Likes
643

Hi,

I suspect this is because of the length of the fields in the output. Try like this - After you download the data into your excel, select the whole sheet of your excel and then click on the 1st line which separates your 1st and the 2nd column. ( Column Separator so that the excel itself gets adjusted based on the field lengths).

It appears that the data is merged but actually it is not.

Thanks,

Guru.

Read only

Former Member
0 Likes
643

Hi,

If the line crosses more than 1024 characters then it will go for second line.

To avoid above, follow below steps.

In PF-Status bar you can see different buttons in ALV grid output.



=> Click on Next to the Subtotal Icon i.e Print Preview Icon ( Ctrl+Shift+F10 )
=> Now it will take to you list screen
=> In list screen click on Next to the Subtotal Icon i.e Spread Sheet ( Ctrl+Shift+F7 )
=> It will show a dialog box with 3 radio buttons. Select Excel (In MHTML Format) click on continue.
     Note: in this dialog box never check the option Always use Selected Format.
=> Select the destination where you want save and click on save.

Regards,

Shankar.