cancel
Showing results for 
Search instead for 
Did you mean: 

WD ABAP - Worksheet issue of Excel sheet

Former Member
0 Kudos

Hi experts,

The requirement is such that there is a link and a table.

When the link will be clicked the whole table will be downloaded into excel file.

I have written a code to download the table into excel file.

Here is the part of the code----


  • convert 'Text' to 'XTEXT'

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = l_text1

IMPORTING

buffer = l_xtext1.

wdr_task=>client_window->client->attach_file_to_response(

*path to the word file

i_filename = l_filename

  • String Variable

i_content = l_xtext1

  • File Type

i_mime_type = 'EXCEL').

When the link is being clicked a pop up comes with three options 'Open','Save' and 'Cancel'.

If 'Save' is clicked the file is name with a name 'Reportee.xls' and when the excel sheet is being opened in the worksheet ,it shows the name 'Reportee.xls'.

Issues----

The issue arises when user clicks 'Open' option and worksheet area it shows '.xls]Repotee(1)'.

Instead of '.xls]Repotee(1)' it should be 'Reportee.xls'.

Please help me sort out the issue.

Thanking you.

Anindita Banerjee

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anandita,

Try using the Variable "File Type" in the method call attach_file_to_response.

Cheers,

Kunjal