2023 Jun 21 10:22 AM
Hi.
I'm using this code to export the output into a sheet:
o_functions = o_salv->get_functions( ).<br> o_functions->set_all( abap_true ).<br>
However, I have a problem because my ALV grid is colored and apparently that means the export to Microsoft Excel takes an enormous amount of time (I'm talking a couple of minutes for less than a thousand lines). The colors are being copied too (which I would rather not) and some values are not correct.
I noticed that if I right click on the output ALV grid and select "Spreadsheet", the result is much quicker and instead of the table being directly opened in Microsoft Excel, it instead opens a Save As dialog, and the table is fine.
I noticed that in some programs I see "Microsoft Excel" buttons and in some I see "Spreadsheet" buttons. They are very similar in looks but function differently.
So the question is.
How do I get the "Spreadsheet" button instead of "Microsoft Excel" button?
Thanks!
2023 Jun 21 11:08 AM
Good question, and well asked. I'm not sure whether I have the most simple answer but let's see what other people say.
The export buttons are different between full screen (old, slow and ugly XXL) and grid (the fast and modern XLSX + many other possible formats = function code &XXL)
In full screen, either you use the standard solution to use modern XLSX:
Or custom code:
NB: what I call "full screen" mode, is when you call this way:
cl_salv_table=>factory( IMPORTING ... CHANGING ... ).
(without mentioning EXPORTING followed by any of these 3 parameters R_CONTAINER ("grid" mode), LIST_DISPLAY ("ABAP list" mode) and CONTAINER_NAME (also "grid" mode), or they are somewhat possibly passed empty).