2015 Jul 07 12:42 PM
Hi experts ,
I am exporting output of my report in an excel sheet, but column headings are truncating in the excel as shown in the below screenshot.
the output is displayed as:
as I have used the solution"wa_fieldcat-ddictxt = 'L'." But this is also not working as i am using the factory methods to display the ALV as shown below.
Please help and thanks in advance.
Regards,
Ashish
2015 Jul 07 2:51 PM
Hi Ashish,
The option you are using is a Local file download and is not download the file as an Excel file.
I see that you are using SALV to display ALV. In that case, you get the option to download the ALV as an actual spreadsheet through this menu path.
Try this option and see if you still face issues.
Thanks,
Juwin
2015 Jul 07 1:10 PM
Hi Ashish,
The requirement is not very clear to me.Still I would suggest - please check the separator that you are using.
Can you try using cl_abap_char_utilities=>horizontal_tab.
Regards,
Shiwali
2015 Jul 07 2:51 PM
Hi Ashish,
The option you are using is a Local file download and is not download the file as an Excel file.
I see that you are using SALV to display ALV. In that case, you get the option to download the ALV as an actual spreadsheet through this menu path.
Try this option and see if you still face issues.
Thanks,
Juwin
2015 Jul 07 3:43 PM
Hi Juwin,
Thanks for your response.
But I want to export my output using this Local file download only in the excel.
2015 Jul 08 11:09 AM
Hi Ashish,
Check output length in fieldcatalog, heading passed to fieldcatalog-seltext_L & if you creating fieldcatalog from internal table, then check length of columns in final internal table structure.
If not working post your fieldcatalog.
Regards,
Ajinkya
2021 Feb 09 2:13 AM
Hi ashish.goyal2,
I read you thread and solve the problem like this:
- I Set the column optimize;
- After getting the column data as in your code, I set the short and midium text with empty value;
-Then I used the method set_fixed_header_text to make a similar efect as the "wa_fieldcat-ddictxt = 'L'", but thinking right now I made so many tests that I am not sure that this part is realy necessary, please try without it and check if you get the excel with the complete text of the header.
I hope this helps you.
*** columns settings
lo_columns = lo_alv->get_columns( ).
lo_columns->set_optimize( ).
lo_col_ref = lo_columns->get( ).
LOOP AT lo_col_ref ASSIGNING <fs_col_ref>.
<fs_col_ref>-r_column->set_short_text( '' ).
<fs_col_ref>-r_column->set_medium_text( '' ).
CALL METHOD <fs_col_ref>-r_column->set_fixed_header_text
EXPORTING
value = 'L'.
ENDLOOP.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |