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: 

OLE Excel taking long time to load the data from internal table to excel SAP ABAP ?

former_member396057
Participant
0 Kudos
1,861

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

1 ACCEPTED SOLUTION

Tomas_Buryanek
Active Contributor
811

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").

-- Tomas --
5 REPLIES 5

DoanManhQuynh
Active Contributor
0 Kudos
811

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

matt
Active Contributor
811

ABAP2XLSX is what you need.

Tomas_Buryanek
Active Contributor
812

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").

-- Tomas --

811

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

Sandra_Rossi
Active Contributor
0 Kudos
811

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).