2016-06-24 95 views
0

我想知道是否有人成功地用UiPath打開密碼保護的XL電子表格。用UiPath打開密碼保護的Excel電子表格

我嘗試使用「打開工作簿」並在密碼字段中輸入密碼...但這並不奏效。

我試過使用Open Application ...但我似乎無法與密碼對話框交談。

真的很蠢!

回答

1

更新Excel活動。使用新的Excel應用程序範圍。設置密碼屬性。

0

嘗試保存這個受密碼保護的Excel虛擬數據文件(https://cdn-business2.discourse.org/uploads/uipath/original/2X/2/25c38fb93744b863e5db1e50f757a6cdf8b77128.xlsx),並根據下面的代碼運行它(保存爲XAML,UiPath文件)。

希望有所幫助。

<Activity mc:Ignorable="sap sap2010 sads" x:Class="excel_password" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="excel_password_1" 
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" 
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" 
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" 
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" 
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" 
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" 
xmlns:sd="clr-namespace:System.Data;assembly=System.Data" 
xmlns:ui="http://schemas.uipath.com/workflow/activities" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
    <TextExpression.NamespacesForImplementation> 
    <sco:Collection x:TypeArguments="x:String"> 
     <x:String>System.Activities</x:String> 
     <x:String>System.Activities.Statements</x:String> 
     <x:String>System.Activities.Expressions</x:String> 
     <x:String>System.Activities.Validation</x:String> 
     <x:String>System.Activities.XamlIntegration</x:String> 
     <x:String>Microsoft.VisualBasic</x:String> 
     <x:String>Microsoft.VisualBasic.Activities</x:String> 
     <x:String>System</x:String> 
     <x:String>System.Collections</x:String> 
     <x:String>System.Collections.Generic</x:String> 
     <x:String>System.Data</x:String> 
     <x:String>System.Diagnostics</x:String> 
     <x:String>System.Drawing</x:String> 
     <x:String>System.IO</x:String> 
     <x:String>System.Linq</x:String> 
     <x:String>System.Net.Mail</x:String> 
     <x:String>System.Xml</x:String> 
     <x:String>System.Xml.Linq</x:String> 
     <x:String>UiPath.Core</x:String> 
     <x:String>UiPath.Core.Activities</x:String> 
     <x:String>System.Windows.Markup</x:String> 
     <x:String>System.Xml.Serialization</x:String> 
    </sco:Collection> 
    </TextExpression.NamespacesForImplementation> 
    <TextExpression.ReferencesForImplementation> 
    <sco:Collection x:TypeArguments="AssemblyReference"> 
     <AssemblyReference>System.Activities</AssemblyReference> 
     <AssemblyReference>Microsoft.VisualBasic</AssemblyReference> 
     <AssemblyReference>mscorlib</AssemblyReference> 
     <AssemblyReference>System.Data</AssemblyReference> 
     <AssemblyReference>System</AssemblyReference> 
     <AssemblyReference>System.Drawing</AssemblyReference> 
     <AssemblyReference>System.Core</AssemblyReference> 
     <AssemblyReference>System.Xml</AssemblyReference> 
     <AssemblyReference>System.Xml.Linq</AssemblyReference> 
     <AssemblyReference>UiPath.Core</AssemblyReference> 
     <AssemblyReference>UiPath.Core.Activities</AssemblyReference> 
     <AssemblyReference>PresentationFramework</AssemblyReference> 
     <AssemblyReference>WindowsBase</AssemblyReference> 
     <AssemblyReference>PresentationCore</AssemblyReference> 
     <AssemblyReference>System.Xaml</AssemblyReference> 
     <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference> 
    </sco:Collection> 
    </TextExpression.ReferencesForImplementation> 
    <Sequence DisplayName="excel_password" sap2010:WorkflowViewState.IdRef="Sequence_2"> 
    <Sequence.Variables> 
     <Variable x:TypeArguments="sd:DataTable" Name="dt" /> 
     <Variable x:TypeArguments="x:String" Name="dt_op" /> 
    </Sequence.Variables> 
    <ui:ReadRange AddHeaders="True" DataTable="[dt]" DisplayName="Read range" sap2010:WorkflowViewState.IdRef="ReadRange_1" Password="uipath" SheetName="Sheet1" WorkbookPath="dummy.xlsx"> 
     <ui:ReadRange.Range> 
     <InArgument x:TypeArguments="x:String"> 
      <Literal x:TypeArguments="x:String" Value="" /> 
     </InArgument> 
     </ui:ReadRange.Range> 
    </ui:ReadRange> 
    <ui:OutputDataTable DataTable="[dt]" DisplayName="Output data table" sap2010:WorkflowViewState.IdRef="OutputDataTable_1" Text="[dt_op]" /> 
    <WriteLine DisplayName="Write line" sap2010:WorkflowViewState.IdRef="WriteLine_1" Text="[dt_op]" /> 
    <ui:MessageBox Caption="{x:Null}" ChosenButton="{x:Null}" Buttons="Ok" DisplayName="Message box" sap2010:WorkflowViewState.IdRef="MessageBox_1" Text="[dt_op]" TopMost="True" /> 
    <sads:DebugSymbol.Symbol>dyxDOlxVc2Vyc1xtbWlhb1xEb3dubG9hZHNcZXhjZWxfcGFzc3dvcmQueGFtbA47A0sOAgEBQAVGFAIBDUcFR48BAgEISAVIaAIBBUkFSbUBAgECQC9ANQIBEkMLQzoCARFAhgFAjgECARBAmQFAoQECAQ9ArwFAuwECAQ5HgwFHjAECAQtHI0cpAgEJSFxIZQIBBkmaAUmjAQIBAw==</sads:DebugSymbol.Symbol> 
    </Sequence> 
    <sap2010:WorkflowViewState.ViewStateManager> 
    <sap2010:ViewStateManager> 
     <sap2010:ViewStateData Id="ReadRange_1" sap:VirtualizedContainerService.HintSize="314,87" /> 
     <sap2010:ViewStateData Id="OutputDataTable_1" sap:VirtualizedContainerService.HintSize="314,22" /> 
     <sap2010:ViewStateData Id="WriteLine_1" sap:VirtualizedContainerService.HintSize="314,61" /> 
     <sap2010:ViewStateData Id="MessageBox_1" sap:VirtualizedContainerService.HintSize="314,59" /> 
     <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="336,473"> 
     <sap:WorkflowViewStateService.ViewState> 
      <scg:Dictionary x:TypeArguments="x:String, x:Object"> 
      <x:Boolean x:Key="IsExpanded">True</x:Boolean> 
      </scg:Dictionary> 
     </sap:WorkflowViewStateService.ViewState> 
     </sap2010:ViewStateData> 
     <sap2010:ViewStateData Id="excel_password_1" sap:VirtualizedContainerService.HintSize="376,553" /> 
    </sap2010:ViewStateManager> 
    </sap2010:WorkflowViewState.ViewStateManager> 
</Activity>