Application Development 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: 

download to excel

Former Member
0 Kudos

hi,

we r upgrading from 3.1i to 4.7.

using the function module EXCEL_OLE_STANDARD_DAT TO DONLOAD to excel.

this function module works fine in 3.1i. when executed in 4.7 its giving short dump if internal table is of packed or currency or quantity.

if internal table converted to character its working.i dont want to convert and download as it may be used in some other application.

pls give me the function module which downloads to excel which takes all data type.

Regards

Ajay

6 REPLIES 6

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I usually use the class CL_GUI_FRONTEND_SERVICES and the method GUI_DOWNLOAD.  Just choose filetype ASC and pass a X to the value write_field_separator. This will write out a tab-delimited text file that Excel should have no problem reading. This is very similar to using the old WS_DOWNLOAD or DOWNLOAD function module.

0 Kudos

tqs for the reply. but gui_download into the presentation server.

but the user wnats the excel open when downloaded

0 Kudos

That's no problem.  Just follow up the download with with a call to CL_GUI_FRONTEND_SERVICES=>EXECUTE. Pass the complete path and filename to the APPLICATION parameter on the method call. This is will use your windows appliation mapping to open the downloaded file in Excel.

0 Kudos

Hi Thomas!

You could with the FM WS_DOWNLOAD and with filetype “DAT” export the column heading. The FM can download only table body in “ASC”.

Question: how can you download column heading as additional to the internal table body with the class CL_GUI_FRONTEND_SERVICES?

Former Member
0 Kudos

Hi Thomas,

I have had the same problem a couple of days ago. After analysing the class-methods i realized, that it won't work.

In fact there is a property for exporting header-lines, but it won't be used by the excel exchange; only for the text-export!

It is funny, becouse some methods are reading the complete DDIC Infos; except the header-textes:((

I am sorry to tell you that.

BR

Michael

Former Member
0 Kudos

Hello ajay,

For this case i use EXCEL inplace. That is the only way to handle MS-EXCEL in special cases.

Let me know, if you need some sample coding.

BR

Michael