<?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: Desktop Integration (DOI)  Excel password in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/desktop-integration-doi-excel-password/m-p/6547219#M1428995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved on my own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In DOI  unprotect  the columns that are editable with mehtod  &lt;/P&gt;&lt;P&gt;call method g_handle-&amp;gt;protect_range&lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;name    =  wa_fields-fieldname&lt;/P&gt;&lt;P&gt;protect  = '  '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After closing the excel file use  OLE  to setup a password ( = sy-uname)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM set_password .&lt;/P&gt;&lt;P&gt;  DATA: w_excel     TYPE ole2_object,&lt;/P&gt;&lt;P&gt;        w_workbook  TYPE ole2_object,&lt;/P&gt;&lt;P&gt;        w_worksheet TYPE ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT w_excel 'EXCEL.APPLICATION'. "Create object for Excel&lt;/P&gt;&lt;P&gt;  SET PROPERTY OF w_excel  'VISIBLE' = 0. "In background Mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_excel 'WORKBOOKS' = w_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook '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;P&gt;  GET PROPERTY OF w_excel 'ActiveSheet' = w_worksheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Protect the first worksheet with a password&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD OF w_worksheet 'PROTECT'&lt;/P&gt;&lt;P&gt;    EXPORTING #1 = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the Excel file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  GET PROPERTY OF w_excel 'ActiveWorkbook' = w_workbook.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook 'SAVE' NO FLUSH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook 'CLOSE'.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_excel 'CLOSE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FREE OBJECT: w_worksheet, w_excel, w_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SET_PASSWORD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tony pang on Dec 23, 2009 3:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2009 14:18:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-23T14:18:18Z</dc:date>
    <item>
      <title>Desktop Integration (DOI)  Excel password</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/desktop-integration-doi-excel-password/m-p/6547218#M1428994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using DOI to download data from SAP to excel.    In the excel file a range of cells are protected with the method protect of the inteface   i_ oi_spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything is working fine only unprotected cells are changeable.  But  after the download  the users want  to have possibility to  change the protected cells.     The excel-file is asking for a password.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the i_oi_spreadsheet  i can't find  a method with password as parameter.     Is it possible to set  a password  with DOI?&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;&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 10:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/desktop-integration-doi-excel-password/m-p/6547218#M1428994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T10:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Desktop Integration (DOI)  Excel password</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/desktop-integration-doi-excel-password/m-p/6547219#M1428995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved on my own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In DOI  unprotect  the columns that are editable with mehtod  &lt;/P&gt;&lt;P&gt;call method g_handle-&amp;gt;protect_range&lt;/P&gt;&lt;P&gt;exporting &lt;/P&gt;&lt;P&gt;name    =  wa_fields-fieldname&lt;/P&gt;&lt;P&gt;protect  = '  '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After closing the excel file use  OLE  to setup a password ( = sy-uname)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM set_password .&lt;/P&gt;&lt;P&gt;  DATA: w_excel     TYPE ole2_object,&lt;/P&gt;&lt;P&gt;        w_workbook  TYPE ole2_object,&lt;/P&gt;&lt;P&gt;        w_worksheet TYPE ole2_object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CREATE OBJECT w_excel 'EXCEL.APPLICATION'. "Create object for Excel&lt;/P&gt;&lt;P&gt;  SET PROPERTY OF w_excel  'VISIBLE' = 0. "In background Mode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_excel 'WORKBOOKS' = w_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook '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;P&gt;  GET PROPERTY OF w_excel 'ActiveSheet' = w_worksheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Protect the first worksheet with a password&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD OF w_worksheet 'PROTECT'&lt;/P&gt;&lt;P&gt;    EXPORTING #1 = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the Excel file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  GET PROPERTY OF w_excel 'ActiveWorkbook' = w_workbook.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook 'SAVE' NO FLUSH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_workbook 'CLOSE'.&lt;/P&gt;&lt;P&gt;  CALL METHOD OF w_excel 'CLOSE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FREE OBJECT: w_worksheet, w_excel, w_workbook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SET_PASSWORD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: tony pang on Dec 23, 2009 3:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 14:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/desktop-integration-doi-excel-password/m-p/6547219#M1428995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T14:18:18Z</dc:date>
    </item>
  </channel>
</rss>

