-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRenameDuplicatedHeaders.xaml
458 lines (458 loc) · 34.1 KB
/
RenameDuplicatedHeaders.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
<Activity mc:Ignorable="sap sap2010" x:Class="Main" this:Main.ExcelFilePath="Test.xlsx" this:Main.SheetName="Sheet1" this:Main.HeaderRow="1" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="clr-namespace:System;assembly=System.Private.CoreLib" 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=System.Private.CoreLib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=System.Private.CoreLib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data.Common" xmlns:this="clr-namespace:" xmlns:ue="clr-namespace:UiPath.Excel;assembly=UiPath.Excel.Activities" xmlns:ueab="clr-namespace:UiPath.Excel.Activities.Business;assembly=UiPath.Excel.Activities" xmlns:ui="http://schemas.uipath.com/workflow/activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property sap2010:Annotation.AnnotationText="File path of the excel" Name="ExcelFilePath" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
<x:Property sap2010:Annotation.AnnotationText="Name of the Excel sheet." Name="SheetName" Type="InArgument(x:String)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
<x:Property sap2010:Annotation.AnnotationText="Row number of the Excel. Rows start from 1." Name="HeaderRow" Type="InArgument(x:Int32)">
<x:Property.Attributes>
<RequiredArgumentAttribute />
</x:Property.Attributes>
</x:Property>
</x:Members>
<VisualBasic.Settings>
<x:Null />
</VisualBasic.Settings>
<sap:VirtualizedContainerService.HintSize>1173,3476</sap:VirtualizedContainerService.HintSize>
<sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef>
<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.Collections.ObjectModel</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>GlobalVariablesNamespace</x:String>
<x:String>GlobalConstantsNamespace</x:String>
<x:String>UiPath.Excel</x:String>
<x:String>UiPath.Excel.Model</x:String>
<x:String>UiPath.Excel.Activities.Business</x:String>
<x:String>System.Runtime.Serialization</x:String>
<x:String>UiPath.UIAutomationCore.Contracts</x:String>
<x:String>System.ComponentModel</x:String>
<x:String>System.Xml.Serialization</x:String>
<x:String>UiPath.Shared.Activities</x:String>
<x:String>System.Reflection</x:String>
<x:String>UiPath.Core.Activities.Orchestrator</x:String>
<x:String>Microsoft.VisualBasic.CompilerServices</x:String>
<x:String>UiPath.Excel.Activities</x:String>
<x:String>UiPath.Activities.System.Collections</x:String>
<x:String>UiPath.Activities.System.Collections.Filters</x:String>
<x:String>System.Linq.Expressions</x:String>
<x:String>System.Numerics</x:String>
<x:String>System.Activities.Runtime.Collections</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
<AssemblyReference>System.Private.CoreLib</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>System.Data</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>System.Linq</AssemblyReference>
<AssemblyReference>System.Data.Common</AssemblyReference>
<AssemblyReference>System.Drawing</AssemblyReference>
<AssemblyReference>System.Drawing.Primitives</AssemblyReference>
<AssemblyReference>System.Drawing.Common</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System.Xml</AssemblyReference>
<AssemblyReference>System.Xml.Linq</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
<AssemblyReference>UiPath.System.Activities</AssemblyReference>
<AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
<AssemblyReference>UiPath.Studio.Constants</AssemblyReference>
<AssemblyReference>UiPath.Excel.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.Excel.Activities</AssemblyReference>
<AssemblyReference>UiPath.Excel</AssemblyReference>
<AssemblyReference>System.Private.ServiceModel</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization.Formatters</AssemblyReference>
<AssemblyReference>System.Private.DataContractSerialization</AssemblyReference>
<AssemblyReference>System.Runtime.Serialization.Primitives</AssemblyReference>
<AssemblyReference>UiPath.UIAutomationCore</AssemblyReference>
<AssemblyReference>System.ComponentModel.EventBasedAsync</AssemblyReference>
<AssemblyReference>System.ComponentModel.TypeConverter</AssemblyReference>
<AssemblyReference>Microsoft.Win32.Primitives</AssemblyReference>
<AssemblyReference>System.ComponentModel</AssemblyReference>
<AssemblyReference>System.ComponentModel.Primitives</AssemblyReference>
<AssemblyReference>System.ObjectModel</AssemblyReference>
<AssemblyReference>System.Private.Xml</AssemblyReference>
<AssemblyReference>UiPath.Mail.Activities</AssemblyReference>
<AssemblyReference>UiPath.Testing.Activities</AssemblyReference>
<AssemblyReference>UiPath.OCR.Activities</AssemblyReference>
<AssemblyReference>UiPath.Workflow</AssemblyReference>
<AssemblyReference>NPOI</AssemblyReference>
<AssemblyReference>System.Memory.Data</AssemblyReference>
<AssemblyReference>System.Console</AssemblyReference>
<AssemblyReference>System.Configuration.ConfigurationManager</AssemblyReference>
<AssemblyReference>System.Security.Permissions</AssemblyReference>
<AssemblyReference>System.Memory</AssemblyReference>
<AssemblyReference>System.Private.Uri</AssemblyReference>
<AssemblyReference>System.Reflection.DispatchProxy</AssemblyReference>
<AssemblyReference>System.Reflection.TypeExtensions</AssemblyReference>
<AssemblyReference>System.Reflection.Metadata</AssemblyReference>
<AssemblyReference>System.Data.SqlClient</AssemblyReference>
<AssemblyReference>System.Collections.NonGeneric</AssemblyReference>
<AssemblyReference>System.Collections</AssemblyReference>
<AssemblyReference>System.Linq.Expressions</AssemblyReference>
<AssemblyReference>System.Linq.Parallel</AssemblyReference>
<AssemblyReference>System.Collections.Immutable</AssemblyReference>
<AssemblyReference>System.Linq.Queryable</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic.Forms</AssemblyReference>
<AssemblyReference>Microsoft.VisualBasic.Core</AssemblyReference>
<AssemblyReference>UiPath.System.Activities.Design</AssemblyReference>
<AssemblyReference>UiPath.System.Activities.ViewModels</AssemblyReference>
<AssemblyReference>HandleDuplicatedExcelColumns.Core</AssemblyReference>
<AssemblyReference>System.Runtime.Numerics</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:Annotation.AnnotationText="* ExcelFilePath: File path of the excel.
* Sheetname: Sheet name that includes table.
* Header Row: Starting row of the table. 1 is the first row of excel." DisplayName="ChangeColumnNamesByExcelFile" sap:VirtualizedContainerService.HintSize="1132,3878" sap2010:WorkflowViewState.IdRef="Sequence_1">
<Sequence.Variables>
<Variable x:TypeArguments="sd:DataTable" Name="DT_InputExcel" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ueab:SequenceX DisplayName="Single Excel Process Scope" sap:VirtualizedContainerService.HintSize="846,3798" sap2010:WorkflowViewState.IdRef="SequenceX_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ueab:ExcelApplicationCard Password="{x:Null}" ReadFormatting="{x:Null}" sap2010:Annotation.AnnotationText="
Input Excel File Scope" CreateNewFile="False" DisplayName="Use Excel File" sap:VirtualizedContainerService.HintSize="812,3715" sap2010:WorkflowViewState.IdRef="ExcelApplicationCard_1" ResizeWindow="None" TemplatePath="Test.xlsx" WorkbookPath="[ExcelFilePath]">
<ueab:ExcelApplicationCard.Body>
<ActivityAction x:TypeArguments="ue:IWorkbookQuickHandle">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="ue:IWorkbookQuickHandle" Name="Excel" />
</ActivityAction.Argument>
<Sequence DisplayName="Do" sap:VirtualizedContainerService.HintSize="778,3381" sap2010:WorkflowViewState.IdRef="Sequence_2">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Name="__text" />
<Variable x:TypeArguments="scg:Dictionary(x:Object, x:Int32)" Name="ValuesCount" />
<Variable x:TypeArguments="scg:Dictionary(x:Int32, x:String)" Name="Dictionary_ColumnIndex" />
<Variable x:TypeArguments="x:Int32" Name="IndexCol" />
<Variable x:TypeArguments="x:Int32" Name="index" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap2010:Annotation.AnnotationText="
Initialize the list of New Column Names Index" sap:VirtualizedContainerService.HintSize="744,156" sap2010:WorkflowViewState.IdRef="Assign_4">
<Assign.To>
<OutArgument x:TypeArguments="scg:Dictionary(x:Int32, x:String)">[Dictionary_ColumnIndex]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="scg:Dictionary(x:Int32, x:String)">[new Dictionary(of Int32, String)]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<ueab:ReadRangeX sap2010:Annotation.AnnotationText="
Read excel range based on a header row" DisplayName="Read Range" HasHeaders="False" sap:VirtualizedContainerService.HintSize="744,114" sap2010:WorkflowViewState.IdRef="ReadRangeX_1" Range="[Excel.Sheet(SheetName).Range("A"+HeaderRow.ToString)]" SaveTo="[DT_InputExcel]" VisibleOnly="False">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ueab:ReadRangeX>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="744,173" sap2010:WorkflowViewState.IdRef="LogMessage_1" Level="[UiPath.Core.Activities.LogLevel.Info]" Message="["Header read."]" />
<ui:ForEach x:TypeArguments="x:Object" sap2010:Annotation.AnnotationText="
Append column names to the dictionary" CurrentIndex="[IndexCol]" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="744,114" sap2010:WorkflowViewState.IdRef="ForEach`1_5" Values="[DT_InputExcel.Rows(0).ItemArray]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="currentItem" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="468,165" sap2010:WorkflowViewState.IdRef="Sequence_17">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap:VirtualizedContainerService.HintSize="434,105" sap2010:WorkflowViewState.IdRef="Assign_5">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[Dictionary_ColumnIndex(IndexCol)]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[currentItem.ToString]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
<ui:ForEach x:TypeArguments="x:String" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="
For each distinct column name,
Count have many of them" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="744,2154" sap2010:WorkflowViewState.IdRef="ForEach`1_1" Values="[DT_InputExcel.Rows(0).ItemArray _
 .Select(Function(item) item.ToString().ToLower()) _
 .Distinct() _
 .ToArray()]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:String">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:String" Name="currentText" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="710,1901" sap2010:WorkflowViewState.IdRef="Sequence_4">
<Sequence.Variables>
<Variable x:TypeArguments="x:Int32" Name="ColumnNameCount" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap2010:Annotation.AnnotationText="
Count the number of the Column names in the first row (header)." sap:VirtualizedContainerService.HintSize="676,156" sap2010:WorkflowViewState.IdRef="Assign_1">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[ColumnNameCount]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">[DT_InputExcel.Rows(0).ItemArray.Count(Function(item) item.ToString.ToLower = currentText.ToString.ToLower)]</InArgument>
</Assign.Value>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Assign>
<If sap2010:Annotation.AnnotationText="
If the Column Name duplicated." Condition="[ColumnNameCount>1]" sap:VirtualizedContainerService.HintSize="676,1685" sap2010:WorkflowViewState.IdRef="If_2">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="Then" sap:VirtualizedContainerService.HintSize="642,1393" sap2010:WorkflowViewState.IdRef="Sequence_9">
<Sequence.Variables>
<Variable x:TypeArguments="x:Int32" Name="index" />
<Variable x:TypeArguments="x:Int32" Name="IndexofAllColumns" />
<Variable x:TypeArguments="x:Int32" Name="NewIndex" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap:VirtualizedContainerService.HintSize="608,114" sap2010:WorkflowViewState.IdRef="Assign_6">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[NewIndex]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">1</InArgument>
</Assign.Value>
</Assign>
<ui:ForEach x:TypeArguments="x:Object" CurrentIndex="[IndexofAllColumns]" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="608,1219" sap2010:WorkflowViewState.IdRef="ForEach`1_4" Values="[DT_InputExcel.Rows(0).ItemArray]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="currentItem" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="574,1032" sap2010:WorkflowViewState.IdRef="Sequence_13">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<TryCatch DisplayName="Try Catch" sap:VirtualizedContainerService.HintSize="540,972" sap2010:WorkflowViewState.IdRef="TryCatch_1">
<TryCatch.Try>
<If sap2010:Annotation.AnnotationText="
Renamed the column name" Condition="[currentItem.ToString.ToLower = currentText.ToString.ToLower]" sap:VirtualizedContainerService.HintSize="502,721" sap2010:WorkflowViewState.IdRef="If_3">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<If.Then>
<Sequence DisplayName="Then" sap:VirtualizedContainerService.HintSize="468,452" sap2010:WorkflowViewState.IdRef="Sequence_14">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap:VirtualizedContainerService.HintSize="434,114" sap2010:WorkflowViewState.IdRef="Assign_8">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[Dictionary_ColumnIndex(IndexofAllColumns)]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[currentItem.ToString+" ("+NewIndex.ToString+")"]</InArgument>
</Assign.Value>
</Assign>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="434,173" sap2010:WorkflowViewState.IdRef="LogMessage_2" Level="[UiPath.Core.Activities.LogLevel.Info]" Message="["Header renamed as: " & currentItem.ToString+" ("+NewIndex.ToString+")"]" />
<Assign sap:VirtualizedContainerService.HintSize="434,105" sap2010:WorkflowViewState.IdRef="Assign_7">
<Assign.To>
<OutArgument x:TypeArguments="x:Int32">[NewIndex]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:Int32">[NewIndex+1]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Else" sap:VirtualizedContainerService.HintSize="416,89" sap2010:WorkflowViewState.IdRef="Sequence_15">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Sequence>
</If.Else>
</If>
</TryCatch.Try>
<TryCatch.Catches>
<Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="506,22" sap2010:WorkflowViewState.IdRef="Catch`1_1">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<ActivityAction x:TypeArguments="s:Exception">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
</ActivityAction.Argument>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="334,141" sap2010:WorkflowViewState.IdRef="LogMessage_3" Level="[UiPath.Core.Activities.LogLevel.Error]" Message="["Something went wrong with the header " & currentItem.ToString & ": " & exception.Message]" />
</ActivityAction>
</Catch>
</TryCatch.Catches>
</TryCatch>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
</Sequence>
</If.Then>
<If.Else>
<Sequence DisplayName="Else" sap:VirtualizedContainerService.HintSize="416,89" sap2010:WorkflowViewState.IdRef="Sequence_10">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</Sequence>
</If.Else>
</If>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
<ui:ForEach x:TypeArguments="scg:KeyValuePair(x:Int32, x:String)" CurrentIndex="{x:Null}" sap2010:Annotation.AnnotationText="
Change the header column names base on a dictionary" DisplayName="For Each" sap:VirtualizedContainerService.HintSize="744,114" sap2010:WorkflowViewState.IdRef="ForEach`1_7" Values="[Dictionary_ColumnIndex]">
<ui:ForEach.Body>
<ActivityAction x:TypeArguments="scg:KeyValuePair(x:Int32, x:String)">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="scg:KeyValuePair(x:Int32, x:String)" Name="item" />
</ActivityAction.Argument>
<Sequence DisplayName="Body" sap:VirtualizedContainerService.HintSize="468,165" sap2010:WorkflowViewState.IdRef="Sequence_19">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<Assign sap:VirtualizedContainerService.HintSize="434,105" sap2010:WorkflowViewState.IdRef="Assign_10">
<Assign.To>
<OutArgument x:TypeArguments="x:String">[DT_InputExcel.Columns(item.Key).ColumnName]</OutArgument>
</Assign.To>
<Assign.Value>
<InArgument x:TypeArguments="x:String">[item.value.ToString]</InArgument>
</Assign.Value>
</Assign>
</Sequence>
</ActivityAction>
</ui:ForEach.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:ForEach>
<ui:InvokeCode ContinueOnError="{x:Null}" sap2010:Annotation.AnnotationText="
Remove the based row" Code="DT_Excel.Rows.RemoveAt(0);" DisplayName="Invoke Code" sap:VirtualizedContainerService.HintSize="744,99" sap2010:WorkflowViewState.IdRef="InvokeCode_2" Language="CSharp">
<ui:InvokeCode.Arguments>
<InOutArgument x:TypeArguments="sd:DataTable" x:Key="DT_Excel">[DT_InputExcel]</InOutArgument>
</ui:InvokeCode.Arguments>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ui:InvokeCode>
<ueab:WriteRangeX sap2010:Annotation.AnnotationText="
Write back the datatable to the same excel file." Destination="[Excel.Sheet(SheetName).Range("A"+(HeaderRow).ToString)]" DisplayName="Write DataTable to Excel" sap:VirtualizedContainerService.HintSize="744,233" sap2010:WorkflowViewState.IdRef="WriteRangeX_3" IgnoreEmptySource="False" Source="[DT_InputExcel]">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ueab:WriteRangeX>
<ui:LogMessage DisplayName="Log Message" sap:VirtualizedContainerService.HintSize="744,164" sap2010:WorkflowViewState.IdRef="LogMessage_4" Level="[UiPath.Core.Activities.LogLevel.Info]" Message="["Datatable writed back to Excel."]" />
</Sequence>
</ActivityAction>
</ueab:ExcelApplicationCard.Body>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean>
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
<x:Boolean x:Key="IsPinned">False</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</ueab:ExcelApplicationCard>
</ueab:SequenceX>
</Sequence>
</Activity>