<?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 with ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808846#M346955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kathirvel ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstly thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but call method of o_workbook 'close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives a sy-subrc value of 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do u know why this happens?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2006 10:20:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-05T10:20:06Z</dc:date>
    <item>
      <title>Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808844#M346953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My requirement is that i need to delete the first worksheet in an excel file using ABAP....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please lend help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 08:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808844#M346953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T08:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808845#M346954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will solve your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zkb_delete_excel_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS ole2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: o_application TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_workbook    TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_worksheet   TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_sheet       TYPE ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_excel TYPE rlgrap-filename DEFAULT 'C:\Soft\Book1.xls',&lt;/P&gt;&lt;P&gt;            p_sheet(30) TYPE c DEFAULT 'Sheet2'.&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;P&gt;  CREATE OBJECT o_application 'Excel.Application'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'Workbooks' = o_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_workbook 'Open' EXPORTING #1 = p_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'WORKSHEETS' = o_sheet EXPORTING #1 = p_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_sheet 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_workbook 'Save'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_workbook 'Close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FREE: o_application, o_workbook, o_worksheet, o_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 09:41:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808845#M346954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808846#M346955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kathirvel ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstly thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but call method of o_workbook 'close'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives a sy-subrc value of 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do u know why this happens?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 10:20:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808846#M346955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T10:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808847#M346956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raksha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment that line, The method close might not be available I believe.&lt;/P&gt;&lt;P&gt;I will check the same and get back to you I find any thing.&lt;/P&gt;&lt;P&gt;You can find more information from here, &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/db/9987b3c3cf11d194ad00a0c94260a5/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/db/9987b3c3cf11d194ad00a0c94260a5/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward point if that helped you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 10:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808847#M346956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T10:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808848#M346957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yep...ill surely reward points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but even after commenting the call method...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get sy-subrc = 2 for the prev call method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i am also not able to make out what the problem is&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 10:37:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808848#M346957</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T10:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808849#M346958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The objects were not properly cleared :-(. &lt;/P&gt;&lt;P&gt;Now just after save just we free the objects. It is working for me jsut check and revert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zkb_delete_excel_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS ole2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: o_application TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_workbook    TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_worksheet   TYPE ole2_object,&lt;/P&gt;&lt;P&gt;      o_sheet       TYPE ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_excel TYPE rlgrap-filename DEFAULT 'C:\Soft\Book1.xls',&lt;/P&gt;&lt;P&gt;            p_sheet(30) TYPE c DEFAULT 'Sheet2'.&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;P&gt;  CREATE OBJECT o_application 'Excel.Application'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'Workbooks' = o_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_workbook 'Open' EXPORTING #1 = p_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'WORKSHEETS' = o_sheet EXPORTING #1 = p_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_sheet 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_workbook 'Save'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'Save'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FREE OBJECT: o_application, o_workbook, o_worksheet, o_sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 10:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808849#M346958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T10:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808850#M346959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nope...its not wrking here&lt;/P&gt;&lt;P&gt;it still gives sy-subrc 2 for the free statement    &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 10:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808850#M346959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T10:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808851#M346960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes u r right I still get the sy-subrc as 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace the  last line with these as this is the way the excel ole app needs to be closed,  &lt;/P&gt;&lt;P&gt;  CALL METHOD OF o_application 'QUIT'.&lt;/P&gt;&lt;P&gt;  FREE OBJECT o_sheet.&lt;/P&gt;&lt;P&gt;  FREE OBJECT o_worksheet.&lt;/P&gt;&lt;P&gt;  FREE OBJECT o_workbook.&lt;/P&gt;&lt;P&gt;  FREE OBJECT o_application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still you will get sy-subrc as 2. I am not able to figure out the reason.&lt;/P&gt;&lt;P&gt;But it is deleting the worksheet correctly which is your main problem I believe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could get it just update this thread... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 11:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808851#M346960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T11:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808852#M346961</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;Actually what is happening is tht when i create an object o_application&lt;/P&gt;&lt;P&gt;there are five fields in it.... the header is getting populated with -1 and the clsid, CB_INDEX are not getting populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u tell me what these fields are getting populated with when u run ur code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the sheet is not getting deleted here &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 13:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808852#M346961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T13:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808853#M346962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are the values of my o_application object,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HEADER - OBJH&lt;/P&gt;&lt;P&gt;TYPE	- OLE2&lt;/P&gt;&lt;P&gt;HANDLE - 1-&lt;/P&gt;&lt;P&gt;CB_INDEX - 	                                   &lt;/P&gt;&lt;P&gt;CLSID - 	                                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One reason is that the sheet might be open already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 09:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808853#M346962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Excel with ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808854#M346963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Kathirvel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even me getting same values....&lt;/P&gt;&lt;P&gt;its wrking on another server....&lt;/P&gt;&lt;P&gt;but the problem is that ,its not automated... it throws a message on the excel sheet saying do u want to delete sheet.... and it doesnt get saved automatically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is req is tht it does the deletion of the sheet automatically... and saves it&lt;/P&gt;&lt;P&gt;i dunno hw to do this... &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKYOU SO MUCH FOR UR HELP &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 09:21:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-with-abap/m-p/1808854#M346963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T09:21:14Z</dc:date>
    </item>
  </channel>
</rss>

