<?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 Re: Excel Sheet in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921808#M939606</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2008 17:09:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-30T17:09:47Z</dc:date>
    <item>
      <title>Excel Sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921806#M939604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the methods from the Type-Pool OLE2 to open an excel sheet and Modify it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this the code I am using to save the file.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF H_EXCEL 'ActiveWorkbook' = H_MAPL.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF H_MAPL 'SaveAs' EXPORTING #1 = FNAME.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF H_MAPL 'Close'.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF H_EXCEL 'Quit'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to replace an existing file with the new data. When I save it in the background I donot want the prompt&lt;/P&gt;&lt;P&gt;saying that "The file already exists in the location.Do you want to replace it?"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want it to directly replace it.Can someone tell me how to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Shashi Devi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 14:42:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921806#M939604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T14:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921807#M939605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Best way to do this is delete the file and then download new one.&lt;/P&gt;&lt;P&gt;I know function module: GUI_DELETE_FILE works absolutely fine in foreground for this task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just have to provide complete file path and it will delete file from your PC.&lt;/P&gt;&lt;P&gt;What I am not sure is if this FM will work in background as this is 'GUI'.&lt;/P&gt;&lt;P&gt;But you can find similar FM in SE37 with 'star FILE star DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF sy-batch = 'X'.
CALL FUNCTION 'GUI_DELETE_FILE'
  EXPORTING
    file_name       = 'C:\CUST1.XLS'
* EXCEPTIONS
*   FAILED          = 1
*   OTHERS          = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this helps.&lt;/P&gt;&lt;P&gt;thnx,&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 20:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921807#M939605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-28T20:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Sheet</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921808#M939606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 17:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-sheet/m-p/3921808#M939606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T17:09:47Z</dc:date>
    </item>
  </channel>
</rss>

