Skip to Content
0
Former Member
Sep 08, 2011 at 02:51 PM

WD ABAP - Worksheet issue of Excel sheet

40 Views

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