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: 

ALV Downloaded to XLSX, the numeric fields are saved as text

former_member206394
Active Participant
0 Kudos
1,557

Dear Experts,

Greetings!

I have an ALV in my SAP ABAP report. When the ALV output is downloaded to XLS format excel sheet; all the fields are proper. meaning the numeric fields are saved as numeric fields only which is as expected. The same ALV output, when downloaded to XLSX format, the numeric fields are saved as text. User need to convert all columns from text to number to be able to calculate sum in excel. We need the fields to be saved as numeric values

Please help with this. Both XLS & XLSX formats should give the numeric fields as numeric fields.

Regards

Shankar

6 REPLIES 6

FredericGirod
Active Contributor
1,008

try ABAP2XLSX

former_member206394
Active Participant
0 Kudos
1,008

Dear Frederic,

We are using CL_GUI_ALV_GRID=>SET_TABLE_FOR_FIRST_DISPLAY to display the ALV. It already has the Download option. From there, we are downloading the output into XLS, XLSX format excel files.

XLS file is all as expected.

XLSX file - the numeric fields are saved as text. User need to convert all columns from text to number to be able to calculate sum in excel. We need the fields to be saved as numeric values

Regards,

Shankar

Sandra_Rossi
Active Contributor
0 Kudos
1,008

I'm surprised that the numbers are not exported as numbers. There are many options to export to XLSX, maybe you didn't choose the right one.

FredericGirod
Active Contributor
0 Kudos
1,008

hide the button, create a new one. With a beautiful class managing dynamicaly the fieldcatalog. After this you could call it in all your ALV grid

former_member206394
Active Participant
0 Kudos
1,008

This is how we downloaded the xlsx file

0 Kudos
1,008

Hi

Can you share the code for download the alv into XLSX file format.