<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Function Module WS_EXCEL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134345#M1365930</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help. I am using the FM 'WS_EXCEL' to download an internal table into an excel file. This FM creates the excel file and then automatically opens the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simple code that I'm using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_filename        LIKE ibipparms-path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_filename = 'C:\My Documents\groupkey.xls'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_EXCEL'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename       = v_filename&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data           = i_rptd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file is being successfuly saved in the following path 'C:\My Documents\groupkey.xls'. However, when the FM tries to open the file it looks like is having problem with the space between 'My Documents', becuase I am getting the following 2 Windows error messages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. 'C:\My.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.&lt;/P&gt;&lt;P&gt;2. 'Documents\groupkey.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: If I change the path to 'C:\groupkey.xls' is working fine. But the user wants to save the file in 'My Documents' folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Sep 2009 19:10:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-15T19:10:03Z</dc:date>
    <item>
      <title>Function Module WS_EXCEL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134345#M1365930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help. I am using the FM 'WS_EXCEL' to download an internal table into an excel file. This FM creates the excel file and then automatically opens the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simple code that I'm using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_filename        LIKE ibipparms-path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_filename = 'C:\My Documents\groupkey.xls'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_EXCEL'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename       = v_filename&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data           = i_rptd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file is being successfuly saved in the following path 'C:\My Documents\groupkey.xls'. However, when the FM tries to open the file it looks like is having problem with the space between 'My Documents', becuase I am getting the following 2 Windows error messages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. 'C:\My.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.&lt;/P&gt;&lt;P&gt;2. 'Documents\groupkey.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: If I change the path to 'C:\groupkey.xls' is working fine. But the user wants to save the file in 'My Documents' folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Francisco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 19:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134345#M1365930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-15T19:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module WS_EXCEL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134346#M1365931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD
	EXPORTING
		FILENAME = v_filename
	CHANGING
		DATA_TAB = i_rptd[].

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then call&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE
	EXPORTING
		DOCUMENT = v_filename.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 19:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134346#M1365931</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-15T19:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module WS_EXCEL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134347#M1365932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a®s thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was my final code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: v_filename type STRING.

v_filename = 'C:My Documentsgroupkey.xls'. 

CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_DOWNLOAD
  EXPORTING
    FILENAME = v_filename
    FILETYPE = 'DAT'
    CONFIRM_OVERWRITE = 'X'

  CHANGING
    DATA_TAB = i_rptd[].

CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE
  EXPORTING
    DOCUMENT = v_filename.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 21:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134347#M1365932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-15T21:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module WS_EXCEL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134348#M1365933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't use function module WS_EXCEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use function module GUI_DOWNLOAD &amp;amp; make the file extension '.xls'.&lt;/P&gt;&lt;P&gt;Or you can try using FM : SAP_CONVERT_TO_XLS_FORMAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tutun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2009 05:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-ws-excel/m-p/6134348#M1365933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-16T05:32:57Z</dc:date>
    </item>
  </channel>
</rss>

