<?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: Hi all problem while saving excel file. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044560#M420840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhijeeth,&lt;/P&gt;&lt;P&gt; Where you mentioned save statement in the code. please check code once, If it is there just debug it and it will clear for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2007 07:53:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-15T07:53:13Z</dc:date>
    <item>
      <title>Hi all problem while saving excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044559#M420839</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;   I have written following code bt facing problem while saving &amp;amp; closing file. It doesn't save file automatically with save statement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZOPEN_EXCEL                             .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include ole2incl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: e_sheet type ole2_object.&lt;/P&gt;&lt;P&gt;data: e_appl  type ole2_object.&lt;/P&gt;&lt;P&gt;data: e_work  type ole2_object.&lt;/P&gt;&lt;P&gt;data: e_cell  type ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: field_value(30) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file type localfile default 'C:\EBP0447_G1.xls'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start the application&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  create object e_appl 'EXCEL.APPLICATION'.&lt;/P&gt;&lt;P&gt;  set property of e_appl 'VISIBLE' = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open the file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of e_appl 'WORKBOOKS' = e_work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method of e_work 'OPEN'&lt;/P&gt;&lt;P&gt;          exporting&lt;/P&gt;&lt;P&gt;               #1 = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write data to the excel file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  do 20 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create the value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    field_value  = sy-index.&lt;/P&gt;&lt;P&gt;    shift field_value left deleting leading space.&lt;/P&gt;&lt;P&gt;    concatenate 'Cell' field_value&lt;/P&gt;&lt;P&gt;       into field_value separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Position to specific cell  in  Column 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of e_appl 'Cells' = e_cell&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;                #1 = sy-index&lt;/P&gt;&lt;P&gt;                #2 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    set property of e_cell 'Value' = field_value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Position to specific cell  in  Column 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call method of e_appl 'Cells' = e_cell&lt;/P&gt;&lt;P&gt;           exporting&lt;/P&gt;&lt;P&gt;                #1 = sy-index&lt;/P&gt;&lt;P&gt;                #2 = 2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    set property of e_cell 'Value' = field_value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close the file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of e_work 'close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Quit the file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of  e_appl  'QUIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  free object e_appl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2007 06:01:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044559#M420839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-15T06:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hi all problem while saving excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044560#M420840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhijeeth,&lt;/P&gt;&lt;P&gt; Where you mentioned save statement in the code. please check code once, If it is there just debug it and it will clear for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2007 07:53:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044560#M420840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-15T07:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hi all problem while saving excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044561#M420841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi lakshman I added save statement as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of e_work 'save'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bt still not working it wont even close the file.&lt;/P&gt;&lt;P&gt;I added that statemnt before closing workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method of e_work 'save'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close the file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of e_work 'close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Quit the file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call method of  e_appl  'QUIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  free object e_appl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2007 12:10:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044561#M420841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-15T12:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hi all problem while saving excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044562#M420842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhijeeth,&lt;/P&gt;&lt;P&gt;the hierarchy is:&lt;/P&gt;&lt;P&gt;excel&lt;/P&gt;&lt;P&gt;-workbooks       &amp;lt;- this is more like a collection of files; you cannot save this!&lt;/P&gt;&lt;P&gt;--workbook        &amp;lt;- this represents a single file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For saving and closing you have to use the workbook-object!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So add the workbook variable to your code as follows:&lt;/P&gt;&lt;P&gt;call method of e_work 'OPEN'= e_workbook&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;#1 = p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now call the method save and close from this object like:&lt;/P&gt;&lt;P&gt;call method of e_workbook 'save'.&lt;/P&gt;&lt;P&gt;call method of e_workbook 'close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Objekt e_work is like a collection of all workbooks. This is why it has an "s" at the end ( workbooks ).This could not be saved or closed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats all. I hope, this serve well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 15:12:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044562#M420842</guid>
      <dc:creator>thomas13_scheuermann</dc:creator>
      <dc:date>2007-03-21T15:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hi all problem while saving excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044563#M420843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Thomas you solved my problem  awarding you full points. If you have any related links please forward it to me. &lt;/P&gt;&lt;P&gt;   I need to select sheet depending upon sheet name. Right now I am able to select sheet with sheet number and not with sheet name. &lt;/P&gt;&lt;P&gt;  I want to know which are the call methods, properties, etc  available for excel application.&lt;/P&gt;&lt;P&gt;    if possible please provide us some example codes for better understanding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2007 06:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi-all-problem-while-saving-excel-file/m-p/2044563#M420843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-22T06:34:40Z</dc:date>
    </item>
  </channel>
</rss>

