Skip to Content
0
Former Member
Jan 29, 2007 at 09:54 PM

Want to get data in multiple rows and not in one row of excel..

275 Views

Hi,

I am trying to write data in a file using separated by ',' keyword, so that the data when written in Excel file using GUI_DOwnload, will separate the fields. But the problem is all the data is separated by comma in just one row of excel file.

LOOP AT it_itab.

IF sy-tabix = 1.

v_string = it_itab-name.

ELSE.

CONCATENATE v_string it_itab-name INTO v_string separated by ','.

ENDIF.

ENDLOOP.

APPEND v_string TO it_string.

ENDIF.

IF v_string IS NOT INITIAL.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'C:\temp.xls'

TABLES

data_tab = it_string

EXCEPTIONS

file_write_error = 1

no_batch = 2.

But I want to get each data on each separate row.

For example now I am getting ,

row1: Data1, data2, data3... in one row of Excel

But I need in the form:

row1: Data1

row2: Data2

row3: Data3

:

: