<?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 Make excel sheet password protected through ABAP codeu0085 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494559#M229712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, &lt;/P&gt;&lt;P&gt;               Hope you all are doin fine. I `m looking for the solution of my problem. Here&amp;#146;s the problem , I have a interface which send the excel spread sheet to app server. After that we FTP this file to another site . The other site guys open up the excel sheet and make it password protected and move it to another folder on same server. Now they want this automated . I want my interface program save the EXCEL file with password  on application server. This password can be hard coded. In simple word&amp;lt;b&amp;gt; I want my excel sheet password protected&amp;lt;/b&amp;gt; . How can I achive this task .Pl..help me guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2006 16:22:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-03T16:22:52Z</dc:date>
    <item>
      <title>Make excel sheet password protected through ABAP codeu0085</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494559#M229712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, &lt;/P&gt;&lt;P&gt;               Hope you all are doin fine. I `m looking for the solution of my problem. Here&amp;#146;s the problem , I have a interface which send the excel spread sheet to app server. After that we FTP this file to another site . The other site guys open up the excel sheet and make it password protected and move it to another folder on same server. Now they want this automated . I want my interface program save the EXCEL file with password  on application server. This password can be hard coded. In simple word&amp;lt;b&amp;gt; I want my excel sheet password protected&amp;lt;/b&amp;gt; . How can I achive this task .Pl..help me guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 16:22:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494559#M229712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T16:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Make excel sheet password protected through ABAP codeu0085</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494560#M229713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you already using OLE to create your excel file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 16:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494560#M229713</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-03T16:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Make excel sheet password protected through ABAP codeu0085</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494561#M229714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try with OLE. Try calling this OLE methods in ABAP. (Recorded VBA macro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    ActiveWorkbook.SaveAs Filename:= _
        "C:Documents and SettingsManohar.ReddyDesktopBook1.xls", FileFormat:= _
        xlNormal, Password:="manohar", WriteResPassword:="manohar", _
        ReadOnlyRecommended:=False, CreateBackup:=False&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 16:30:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494561#M229714</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-08-03T16:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Make excel sheet password protected through ABAP codeu0085</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494562#M229715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's right,  all you need to do is pass the password when saving.  Please check the sample program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.


include ole2incl.

data: e_sheet type ole2_object.
data: e_appl  type ole2_object.
data: e_work  type ole2_object.
data: e_cell  type ole2_object.
data: e_wbooklist type ole2_object.

data: field_value(30) type c.

parameters: p_file type localfile default 'C:Test.xls'.

start-of-selection.


* Start the application
  create object e_appl 'EXCEL.APPLICATION'.
  set property of e_appl 'VISIBLE' = 0.

* Open the file
  call method of e_appl 'WORKBOOKS' = e_wbooklist.
  get property of e_wbooklist 'Application' = e_appl .
  set property of e_appl 'SheetsInNewWorkbook' = 1 .
  call method of e_wbooklist 'Add' = e_work .
  get property of e_appl 'ActiveSheet' = e_sheet .
  set property of e_sheet 'Name' = 'Test' .





* Write data to the excel file
  do 20 times.

* Create the value
    field_value  = sy-index.
    shift field_value left deleting leading space.
    concatenate 'Cell' field_value into field_value separated by space.


* Position to specific cell  in  Column 1
    call method of e_appl 'Cells' = e_cell
           exporting
                #1 = sy-index
                #2 = 1.
* Set the value
    set property of e_cell 'Value' = field_value .


* Position to specific cell  in  Column 2
    call method of e_appl 'Cells' = e_cell
           exporting
                #1 = sy-index
                #2 = 2.
* Set the value
    set property of e_cell 'Value' = field_value .


* Position to specific cell  in  Column 3
    call method of e_appl 'Cells' = e_cell
           exporting
                #1 = sy-index
                #2 = 3.
* Set the value
    set property of e_cell 'Value' = field_value .

  enddo.



** Close the file
  get property of e_appl 'ActiveWorkbook' = e_work.
&amp;lt;b&amp;gt;  call method of e_work 'SAVEAS'&amp;lt;/b&amp;gt;
        exporting
            #1 = p_file
            #2 = 1           "" Don't ask me when closing
&amp;lt;b&amp;gt;            #3 = 'rich'    "" Password
            #4 = 'rich'.     "" Reserved for Password&amp;lt;/b&amp;gt;

  call method of e_work 'close'.

* Quit the file
  call method of  e_appl  'QUIT'.

* Free them up
  free object e_cell.
  free object e_sheet.
  free object e_work.
  free object e_wbooklist.
  free object e_appl.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 16:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494562#M229715</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-03T16:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make excel sheet password protected through ABAP codeu0085</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494563#M229716</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 am Working on a report in which i have to download data from SAP to a Excel file and create different tabs based on certain condition ,I am using OLE to achieve it but the problem in the control tab of the report is I have to calculate the difference between the two columns which will be dynamically decided from the program .&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;Magnitude column will be left empty for the users to key in the value and the Total column will be filled from the program now another column is created which will be the Difference column and the formula have to be set to calculate the difference between Magnitude and Total Column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Request you to let me know how to set a formula in Excel using OLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akshat Jain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2006 05:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-excel-sheet-password-protected-through-abap-codeu0085/m-p/1494563#M229716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-03T05:31:54Z</dc:date>
    </item>
  </channel>
</rss>

