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: 

cl_gui_frontend_services=>gui_download

Former Member
0 Kudos
6,741

hi.

i use this method to download a table to excel file.

1.when i download i get a file with 6000K and when i open it in notepad i get it tab delimeted.

2.when i opened it and make save as new_name.xls i get 2000K and when i opened it notepad i get it not tab delimeted.

i wnat it to be as the 2. option what i nedd to do.

CALL METHOD cl_gui_frontend_services=>gui_download

EXPORTING

filename = file_down

filetype = 'ASC' * i change it to bin too

      • write_field_separator = 'X' * i made remark

CHANGING

data_tab = IT_DATA

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

not_supported_by_gui = 22

error_no_gui = 23

OTHERS = 24.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,264

Hi,

Try with File type as 'DAT' and field seperator as 'X.

BR,

Lokeswari.

9 REPLIES 9

Former Member
0 Kudos
1,265

Hi,

Try with File type as 'DAT' and field seperator as 'X.

BR,

Lokeswari.

0 Kudos
1,264

tahns.

it did not help me.

what all the the types optional.

0 Kudos
1,264

Hi,

you need to create an excel file and not a csv file.

Maybe this helps you: http://abaplovers.blogspot.com/2008/05/abap-internal-table-to-excel-sheet.html

Best regards,

Oliver

0 Kudos
1,264

it's xls file not csv.

0 Kudos
1,264

If it was xls you wouldn't see tabbed data using notepad.

Excel is standard program to open csv (tabbed delimited) files. So you might think that it is excel, but it isn't.

What does your file look like in notepad after saving it again with Excel?

BR,

Oliver

0 Kudos
1,264

this func help me.

but it open the excel file in the screen

how i can make it not open...

0 Kudos
1,264

0 Kudos
1,264

thank oliver.

here as i seen it in notepad

method gui_download

1.12222 22222 333333

in notepad savin in excel.

2. ׀ֿ א¡± ב > u200F " ְ u200F u200F ž Ÿ   ¡

when i use MS_EXCEL_OLE_STANDARD_DAT i get it good as " 2." but it open in the screen.

0 Kudos
1,264

Hi,

and this is how you see that only the second is a real xls file.

For creating a file without showing you need to use the solution mentioned on the other link or maybe abap2xlsx: http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx

Best regards,

Oliver