2018 Oct 14 11:59 AM
Hi,
I have more than 1000 records in internal table.I want to load the data in excel using OLE excel automation.But it is taking long time to load the contents of internal table into excel i.e it is appending the internal table data into excel cell by cell.excel-file.png
The FM :GUI_DOWNLOAD will not suite my requirement.Because I have header data,column names and footer. ( Attached Screen Shot format of excel)
How to reduce the time to load the internal table data into excel using OLE excel ?
Regards,
Shabbir
2018 Oct 17 8:55 AM
If you have to use OLE (I too recommend ABAP2XLSX) then do not fill data to Excel cell by cell. But do it via. clipboard (cl_gui_frontend_services=>clipboard_export). This way it will paste whole table of data to multiple cells at once. It is much faster method. You can find many examples over the internet (just search "OLE clipboard_export").
2018 Oct 15 1:52 AM
if your excel is not complicate, use transform instead. Or you can try using salv class like this:
https://abapblog.com/articles/tricks/120-create-xlsx-file-from-internal-table-in-background-v2
2018 Oct 15 7:08 AM
2018 Oct 17 8:55 AM
If you have to use OLE (I too recommend ABAP2XLSX) then do not fill data to Excel cell by cell. But do it via. clipboard (cl_gui_frontend_services=>clipboard_export). This way it will paste whole table of data to multiple cells at once. It is much faster method. You can find many examples over the internet (just search "OLE clipboard_export").
2019 Jan 14 6:59 AM
Hi Tomas,
As you suggested,I have used clipboard_export. It is working fine.I can transfer clipboard data to excel with fast uploading.
Regards,
Shabbir
2019 Jan 14 3:07 PM
For information, OLE can be accelerated by delaying the commands using the words NO FLUSH (CALL METHOD, SET PROPERTY, ...), then call the function module FLUSH to send all commands to the frontend.
SAP also provides the Desktop Office Integration, which are classes using OLE, but has built-in accelerations like the link server.
But in the end, abap2xlsx is the best choice (except if you want to use unsupported features).