diff --git a/CodedExcelDemo/.codedworkflows/ConnectionsFactory.cs b/CodedExcelDemo/.codedworkflows/ConnectionsFactory.cs new file mode 100644 index 0000000..6d54fc4 --- /dev/null +++ b/CodedExcelDemo/.codedworkflows/ConnectionsFactory.cs @@ -0,0 +1,3 @@ +namespace CodedExcelDemo +{ +} \ No newline at end of file diff --git a/CodedExcelDemo/.codedworkflows/ConnectionsManager.cs b/CodedExcelDemo/.codedworkflows/ConnectionsManager.cs new file mode 100644 index 0000000..1268570 --- /dev/null +++ b/CodedExcelDemo/.codedworkflows/ConnectionsManager.cs @@ -0,0 +1,12 @@ +using UiPath.CodedWorkflows; +using System; + +namespace CodedExcelDemo +{ + public class ConnectionsManager + { + public ConnectionsManager(ICodedWorkflowsServiceContainer resolver) + { + } + } +} \ No newline at end of file diff --git a/CodedExcelDemo/.project/CodedBindingsMetadata.json b/CodedExcelDemo/.project/CodedBindingsMetadata.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/CodedExcelDemo/.project/CodedBindingsMetadata.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/CodedExcelDemo/.project/PackageBindingsMetadata.json b/CodedExcelDemo/.project/PackageBindingsMetadata.json index 712ff9e..2faacb9 100644 --- a/CodedExcelDemo/.project/PackageBindingsMetadata.json +++ b/CodedExcelDemo/.project/PackageBindingsMetadata.json @@ -1,11 +1,11 @@ { "ActivityBindings": { - "UiPath.Core.Activities.AddAndProcessQueueItem": [ + "UiPath.Activities.System.Jobs.RunJob": [ { - "Type": "queue", + "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -14,20 +14,42 @@ "ValueSource": "Property" }, "name": { - "Value": "QueueType", + "Value": "ProcessName", "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } ], + "UiPath.Core.Activities.AddAndProcessQueueItem": [ + { + "Type": "queue", + "Values": { + "name": { + "Value": "QueueType", + "ValueSource": "Property" + }, + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], "UiPath.Core.Activities.AddQueueItem": [ { "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -40,6 +62,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -49,7 +77,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -62,6 +90,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -87,7 +121,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -100,6 +134,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -107,15 +147,37 @@ "UiPath.Core.Activities.DeleteQueueItems": [ { "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.EvaluateBusinessRule": [ + { + "Type": "businessRule", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" + }, + "name": { + "Value": "BusinessRule", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -125,19 +187,13 @@ "UiPath.Core.Activities.GetJobs": [ { "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.GetQueueItem": [ @@ -145,7 +201,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -158,6 +214,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -167,7 +229,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -180,6 +242,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -189,7 +257,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -202,6 +270,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -211,7 +285,35 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetSecret": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -224,6 +326,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -249,7 +357,7 @@ "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -262,6 +370,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -269,19 +383,13 @@ "UiPath.Core.Activities.PostponeTransactionItem": [ { "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.QueueTrigger": [ @@ -314,6 +422,10 @@ "MaxJobsForActivation": { "Value": "MaxJobsForActivation", "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -325,7 +437,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -338,6 +450,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -347,7 +465,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -360,44 +478,66 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } ], - "UiPath.Core.Activities.SetTransactionProgress": [ + "UiPath.Core.Activities.SetSecret": [ { - "Type": "queue", + "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], "DefaultValueSource": "Property" } ], - "UiPath.Core.Activities.SetTransactionStatus": [ + "UiPath.Core.Activities.SetTransactionProgress": [ { "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.SetTransactionStatus": [ + { + "Type": "queue", "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.StartJob": [ @@ -405,7 +545,7 @@ "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -418,6 +558,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -425,19 +571,13 @@ "UiPath.Core.Activities.StopJob": [ { "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.Storage.DeleteStorageFile": [ @@ -445,7 +585,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -458,6 +598,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -467,7 +613,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -480,6 +626,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -489,7 +641,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -502,6 +654,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -511,7 +669,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -524,6 +682,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -533,7 +697,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -546,6 +710,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -555,7 +725,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -568,6 +738,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -589,6 +765,10 @@ "CronExpression": { "Value": "CronExpression", "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -600,7 +780,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -613,6 +793,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -728,6 +914,257 @@ }, "DefaultValueSource": "Default" } + ], + "UiPath.Mail.Activities.IMAP.NewIMAPEmailReceivedTrigger": [ + { + "Type": "EventTrigger", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + }, + "FilterExpression": { + "Value": "FilterExpression", + "ValueSource": "Property" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "Operation": { + "Value": "Operation", + "ValueSource": "Property" + } + }, + "SubBindings": [ + { + "Type": "Property", + "PublishNullValues": false, + "Key": { + "Value": "MailFolderBindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folder": { + "Value": "MailFolder", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "DisplayLabel": { + "Value": "folder", + "ValueSource": "Constant" + }, + "PrimaryKey": { + "Value": "folder", + "ValueSource": "Constant" + }, + "TriggerCreateParameters": { + "Value": "folder", + "ValueSource": "Constant" + }, + "Overwritable": { + "Value": "false", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.DeleteImapMailMessage": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.GetIMAPMailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.MoveIMAPMailMessageToFolder": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.POP3.Activities.GetPOP3MailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.SMTP.Activities.SendMail": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } ] } } \ No newline at end of file diff --git a/CodedExcelDemo/.project/design.json b/CodedExcelDemo/.project/design.json index 8dda180..206a9f3 100644 --- a/CodedExcelDemo/.project/design.json +++ b/CodedExcelDemo/.project/design.json @@ -1,5 +1,6 @@ -{ - "Tags": [], - "SeparateRuntimeDependencies": true, - "IncludeSources": true +{ + "Tags": [], + "SeparateRuntimeDependencies": true, + "IncludeSources": true, + "ConnectorKeys": [] } \ No newline at end of file diff --git a/CodedExcelDemo/UseWorkbook_Create_5.cs b/CodedExcelDemo/UseWorkbook_Create_5.cs new file mode 100644 index 0000000..7d36745 --- /dev/null +++ b/CodedExcelDemo/UseWorkbook_Create_5.cs @@ -0,0 +1,106 @@ +using CodedExcelDemo.ObjectRepository; +using System; +using System.Collections.Generic; +using System.Data; +using UiPath.Activities.System.Jobs.Coded; +using UiPath.CodedWorkflows; +using UiPath.Core; +using UiPath.Core.Activities.Storage; +using UiPath.Excel; +using UiPath.Excel.Activities; +using UiPath.Excel.Activities.API; +using UiPath.Excel.Activities.API.Models; +using UiPath.Mail.Activities.Api; +using UiPath.Orchestrator.Client.Models; +using UiPath.Testing; +using UiPath.Testing.Activities.Api.Models; +using UiPath.Testing.Activities.Models; +using UiPath.Testing.Activities.TestData; +using UiPath.Testing.Activities.TestDataQueues.Enums; +using UiPath.Testing.Enums; +using UiPath.UIAutomationNext.API.Contracts; +using UiPath.UIAutomationNext.API.Models; +using UiPath.UIAutomationNext.Enums; +using System.IO; + +namespace CodedExcelDemo +{ + public class UseWorkbook_Create_5 : CodedWorkflow + { + [Workflow] + public void Execute() + { + //Test creation of the files (new document) + + var myFile = "myNewFile.xlsx"; + if (File.Exists(myFile)) + File.Delete(myFile); + + using (var wb = excel.UseWorkBook(new WorkbookOptions() {Path = myFile, CreateNew = true})) + { + PrintSheets(wb); + wb.WriteCell("newSheet", "A3", "someText"); + PrintSheets(wb); + } + + Console.WriteLine($"File {myFile} created: {File.Exists(myFile)}"); + + using (var wb = excel.UseWorkBook(new WorkbookOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Replace})) + { + wb.WriteCell("newSheet1", "A3", "someText"); + wb.WriteCell("newSheet2", "A3", "someText"); + PrintSheets(wb); + } + + using (var wb = excel.UseWorkBook(new WorkbookOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Skip})) + { + wb.WriteCell("newSheet3", "A3", "someText"); + wb.WriteCell("newSheet4", "A3", "someText"); + PrintSheets(wb); + } + + try + { + using var wb = excel.UseWorkBook(new WorkbookOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Fail}); + } + catch + { + //Exception expected here because the file already exists + Console.WriteLine("Exception: File already exists"); + } + + + //Write cell in every sheet and check that what was written is ok + using (var wb = excel.UseWorkBook(new WorkbookOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Skip})) + { + Console.WriteLine("Write some value in every sheet and check that value was written properly"); + var sheets = wb.GetSheets(); + foreach(var sheet in sheets) + { + var cellValue = wb.ReadCell(sheet, "B7", true) as string; + if (!string.IsNullOrEmpty(cellValue)) + Console.WriteLine("empty value expected in {sheet}:B7"); + + wb.WriteCell(sheet, "B7", "ltcm"); + } + + foreach(var sheet in sheets) + { + var cellValue = wb.ReadCell(sheet, "B7", true) as string; + if (cellValue != "ltcm") + Console.WriteLine("ltcm is expected in {sheet}:B7"); + } + } + } + + private void PrintSheets(IWorkHandle wb) + { + Console.WriteLine("enumerate sheets"); + var sheets = wb.GetSheets(); + foreach(var sheet in sheets) + { + Console.WriteLine(sheet); + } + } + } +} \ No newline at end of file diff --git a/CodedExcelDemo/project.json b/CodedExcelDemo/project.json index dc26a05..06cbbaa 100644 --- a/CodedExcelDemo/project.json +++ b/CodedExcelDemo/project.json @@ -4,11 +4,11 @@ "description": "Excel coded automation samples", "main": "Main.xaml", "dependencies": { - "UiPath.Excel.Activities": "[2.23.3-alpha.5435483]", - "UiPath.Mail.Activities": "[1.23.0-alpha.5436700]", - "UiPath.System.Activities": "[24.4.0-alpha.5449577]", - "UiPath.Testing.Activities": "[24.2.0-beta.5157561]", - "UiPath.UIAutomation.Activities": "[24.4.0-alpha.5584568]" + "UiPath.Excel.Activities": "[3.4.1]", + "UiPath.Mail.Activities": "[2.7.10]", + "UiPath.System.Activities": "[25.12.2]", + "UiPath.Testing.Activities": "[25.10.1]", + "UiPath.UIAutomation.Activities": "[25.10.27]" }, "webServices": [], "entitiesStores": [], @@ -37,7 +37,6 @@ "projectProfile": "Developement", "outputType": "Process", "libraryOptions": { - "includeOriginalXaml": false, "privateWorkflows": [] }, "processOptions": { @@ -59,6 +58,12 @@ "uniqueId": "a7c2c1ca-ccda-4f3d-8345-a9c2c96ff9a2", "input": [], "output": [] + }, + { + "filePath": "UseWorkbook_Create_5.cs", + "uniqueId": "43e39dc0-85d2-43ac-a4a4-eb941c10e97b", + "input": [], + "output": [] } ], "isTemplate": false, diff --git a/CodedPowerPointDemo/.codedworkflows/ConnectionsFactory.cs b/CodedPowerPointDemo/.codedworkflows/ConnectionsFactory.cs index e3810cd..aaf10b6 100644 --- a/CodedPowerPointDemo/.codedworkflows/ConnectionsFactory.cs +++ b/CodedPowerPointDemo/.codedworkflows/ConnectionsFactory.cs @@ -1,6 +1,3 @@ -using UiPath.CodedWorkflows; -using System; - namespace PowerPointCoded { } \ No newline at end of file diff --git a/CodedPowerPointDemo/.project/PackageBindingsMetadata.json b/CodedPowerPointDemo/.project/PackageBindingsMetadata.json index be482e3..2faacb9 100644 --- a/CodedPowerPointDemo/.project/PackageBindingsMetadata.json +++ b/CodedPowerPointDemo/.project/PackageBindingsMetadata.json @@ -1,733 +1,1170 @@ -{ - "ActivityBindings": { - "UiPath.Core.Activities.AddAndProcessQueueItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueType", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.AddQueueItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueType", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.AddTransactionItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueType", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.BeginProcess": [ - { - "Type": "process", - "Values": { - "name": { - "Value": "ProcessName", - "ValueSource": "Property" - }, - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ], - "UiPath.Core.Activities.BulkAddQueueItems": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.DeleteQueueItems": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetJobs": [ - { - "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetQueueItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueType", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetQueueItems": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetRobotAsset": [ - { - "Type": "asset", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "AssetName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetRobotCredential": [ - { - "Type": "asset", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "AssetName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.GetTransactionItem": [ - { - "Type": "queue", - "Values": { - "name": { - "Value": "QueueType", - "ValueSource": "Property" - }, - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ], - "UiPath.Core.Activities.InvokeProcess": [ - { - "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "ProcessName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.PostponeTransactionItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.QueueTrigger": [ - { - "Type": "QueueTrigger", - "PublishNullValues": false, - "Key": { - "Value": "BindingsKey", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueName", - "ValueSource": "Property" - } - }, - "Arguments": { - "ItemsActivationThreshold": { - "Value": "ItemsActivationThreshold", - "ValueSource": "Property" - }, - "ItemsPerJobActivationTarget": { - "Value": "ItemsPerJobActivationTarget", - "ValueSource": "Property" - }, - "MaxJobsForActivation": { - "Value": "MaxJobsForActivation", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.SetAsset": [ - { - "Type": "asset", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "AssetName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.SetCredential": [ - { - "Type": "asset", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "CredentialName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.SetTransactionProgress": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.SetTransactionStatus": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.StartJob": [ - { - "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "ProcessName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.StopJob": [ - { - "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.DeleteStorageFile": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.DownloadStorageFile": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.ListStorageFiles": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.ReadStorageText": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.UploadStorageFile": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.Storage.WriteStorageText": [ - { - "Type": "bucket", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "StorageBucketName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.TimeTrigger": [ - { - "Type": "TimeTrigger", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": {}, - "Arguments": { - "TimeZone": { - "Value": "TimeZone", - "ValueSource": "Property" - }, - "CronExpression": { - "Value": "CronExpression", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Core.Activities.WaitQueueItem": [ - { - "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, - "Values": { - "folderPath": { - "Value": "FolderPath", - "ValueSource": "Property" - }, - "name": { - "Value": "QueueName", - "ValueSource": "Property" - } - }, - "SubBindings": [], - "DefaultValueSource": "Property" - } - ], - "UiPath.Mail.Activities.Business.ExchangeApplicationCard": [ - { - "Type": "Connection", - "Key": { - "Value": "BindingsKey", - "ValueSource": "Property" - }, - "Values": { - "ConnectionId": { - "Value": "ConnectionId", - "ValueSource": "Property" - } - }, - "Arguments": { - "UseConnectionService": { - "Value": "UseConnectionService", - "ValueSource": "Property" - }, - "Connector": { - "Value": "Connector", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ], - "UiPath.Mail.Activities.Business.GmailApplicationCard": [ - { - "Type": "Connection", - "Key": { - "Value": "BindingsKey", - "ValueSource": "Property" - }, - "Values": { - "ConnectionId": { - "Value": "ConnectionId", - "ValueSource": "Property" - } - }, - "Arguments": { - "UseConnectionService": { - "Value": "UseConnectionService", - "ValueSource": "Property" - }, - "Connector": { - "Value": "Connector", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ], - "UiPath.Mail.Activities.Business.NewGmailTrigger": [ - { - "Type": "EventTrigger", - "Key": { - "Value": "BindingsKey", - "ValueSource": "Property" - }, - "Values": { - "ConnectionId": { - "Value": "ConnectionId", - "ValueSource": "Property" - } - }, - "Arguments": { - "Connector": { - "Value": "Connector", - "ValueSource": "Property" - }, - "Operation": { - "Value": "Operation", - "ValueSource": "Property" - }, - "ObjectName": { - "Value": "ObjectName", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ], - "UiPath.Mail.Activities.Business.NewO365EmailTrigger": [ - { - "Type": "EventTrigger", - "Key": { - "Value": "BindingsKey", - "ValueSource": "Property" - }, - "Values": { - "ConnectionId": { - "Value": "ConnectionId", - "ValueSource": "Property" - } - }, - "Arguments": { - "Connector": { - "Value": "Connector", - "ValueSource": "Property" - }, - "Operation": { - "Value": "Operation", - "ValueSource": "Property" - }, - "ObjectName": { - "Value": "ObjectName", - "ValueSource": "Property" - } - }, - "DefaultValueSource": "Default" - } - ] - } +{ + "ActivityBindings": { + "UiPath.Activities.System.Jobs.RunJob": [ + { + "Type": "process", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "ProcessName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.AddAndProcessQueueItem": [ + { + "Type": "queue", + "Values": { + "name": { + "Value": "QueueType", + "ValueSource": "Property" + }, + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.AddQueueItem": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueType", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.AddTransactionItem": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueType", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.BeginProcess": [ + { + "Type": "process", + "Values": { + "name": { + "Value": "ProcessName", + "ValueSource": "Property" + }, + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.BulkAddQueueItems": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.DeleteQueueItems": [ + { + "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.EvaluateBusinessRule": [ + { + "Type": "businessRule", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "BusinessRule", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetJobs": [ + { + "Type": "process", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.GetQueueItem": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueType", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetQueueItems": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetRobotAsset": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetRobotCredential": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetSecret": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetTransactionItem": [ + { + "Type": "queue", + "Values": { + "name": { + "Value": "QueueType", + "ValueSource": "Property" + }, + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.InvokeProcess": [ + { + "Type": "process", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "ProcessName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.PostponeTransactionItem": [ + { + "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.QueueTrigger": [ + { + "Type": "QueueTrigger", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueName", + "ValueSource": "Property" + } + }, + "Arguments": { + "ItemsActivationThreshold": { + "Value": "ItemsActivationThreshold", + "ValueSource": "Property" + }, + "ItemsPerJobActivationTarget": { + "Value": "ItemsPerJobActivationTarget", + "ValueSource": "Property" + }, + "MaxJobsForActivation": { + "Value": "MaxJobsForActivation", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.SetAsset": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.SetCredential": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "CredentialName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.SetSecret": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.SetTransactionProgress": [ + { + "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.SetTransactionStatus": [ + { + "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.StartJob": [ + { + "Type": "process", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "ProcessName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.StopJob": [ + { + "Type": "process", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.Storage.DeleteStorageFile": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.Storage.DownloadStorageFile": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.Storage.ListStorageFiles": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.Storage.ReadStorageText": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.Storage.UploadStorageFile": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.Storage.WriteStorageText": [ + { + "Type": "bucket", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "StorageBucketName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.TimeTrigger": [ + { + "Type": "TimeTrigger", + "PublishNullValues": false, + "Key": { + "Value": "N/A", + "ValueSource": "Property" + }, + "Values": {}, + "Arguments": { + "TimeZone": { + "Value": "TimeZone", + "ValueSource": "Property" + }, + "CronExpression": { + "Value": "CronExpression", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.WaitQueueItem": [ + { + "Type": "queue", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "QueueName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.Activities.Business.ExchangeApplicationCard": [ + { + "Type": "Connection", + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "UseConnectionService": { + "Value": "UseConnectionService", + "ValueSource": "Property" + }, + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Mail.Activities.Business.GmailApplicationCard": [ + { + "Type": "Connection", + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "UseConnectionService": { + "Value": "UseConnectionService", + "ValueSource": "Property" + }, + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Mail.Activities.Business.NewGmailTrigger": [ + { + "Type": "EventTrigger", + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + }, + "Operation": { + "Value": "Operation", + "ValueSource": "Property" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Mail.Activities.Business.NewO365EmailTrigger": [ + { + "Type": "EventTrigger", + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + }, + "Operation": { + "Value": "Operation", + "ValueSource": "Property" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Mail.Activities.IMAP.NewIMAPEmailReceivedTrigger": [ + { + "Type": "EventTrigger", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + }, + "FilterExpression": { + "Value": "FilterExpression", + "ValueSource": "Property" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "Operation": { + "Value": "Operation", + "ValueSource": "Property" + } + }, + "SubBindings": [ + { + "Type": "Property", + "PublishNullValues": false, + "Key": { + "Value": "MailFolderBindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folder": { + "Value": "MailFolder", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "DisplayLabel": { + "Value": "folder", + "ValueSource": "Constant" + }, + "PrimaryKey": { + "Value": "folder", + "ValueSource": "Constant" + }, + "TriggerCreateParameters": { + "Value": "folder", + "ValueSource": "Constant" + }, + "Overwritable": { + "Value": "false", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.DeleteImapMailMessage": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.GetIMAPMailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.MoveIMAPMailMessageToFolder": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.POP3.Activities.GetPOP3MailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.SMTP.Activities.SendMail": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ] + } } \ No newline at end of file diff --git a/CodedPowerPointDemo/.project/design.json b/CodedPowerPointDemo/.project/design.json index 8dda180..206a9f3 100644 --- a/CodedPowerPointDemo/.project/design.json +++ b/CodedPowerPointDemo/.project/design.json @@ -1,5 +1,6 @@ -{ - "Tags": [], - "SeparateRuntimeDependencies": true, - "IncludeSources": true +{ + "Tags": [], + "SeparateRuntimeDependencies": true, + "IncludeSources": true, + "ConnectorKeys": [] } \ No newline at end of file diff --git a/CodedPowerPointDemo/CreateNewDocument.cs b/CodedPowerPointDemo/CreateNewDocument.cs new file mode 100644 index 0000000..c3ceb23 --- /dev/null +++ b/CodedPowerPointDemo/CreateNewDocument.cs @@ -0,0 +1,77 @@ +using PowerPointCoded.ObjectRepository; +using System; +using System.Collections.Generic; +using System.Data; +using UiPath.Activities.System.Jobs.Coded; +using UiPath.CodedWorkflows; +using UiPath.Core; +using UiPath.Core.Activities.Storage; +using UiPath.Excel; +using UiPath.Excel.Activities; +using UiPath.Excel.Activities.API; +using UiPath.Excel.Activities.API.Models; +using UiPath.Mail.Activities.Api; +using UiPath.Orchestrator.Client.Models; +using UiPath.Presentations; +using UiPath.Presentations.Activities; +using UiPath.Presentations.Activities.API; +using UiPath.Presentations.Activities.API.Models; +using UiPath.Testing; +using UiPath.Testing.Activities.Api.Models; +using UiPath.Testing.Activities.Models; +using UiPath.Testing.Activities.TestData; +using UiPath.Testing.Activities.TestDataQueues.Enums; +using UiPath.Testing.Enums; +using UiPath.UIAutomationNext.API.Contracts; +using UiPath.UIAutomationNext.API.Models; +using UiPath.UIAutomationNext.Enums; +using System.IO; + +namespace PowerPointCoded +{ + public class CreateNewDocument : CodedWorkflow + { + [Workflow] + public void Execute() + { + //Test creation of the files (new document) + + var myFile = "myNewPptFile.pptx"; + if (File.Exists(myFile)) + File.Delete(myFile); + + using (var ppt = powerpoint.UsePresentationDocument(new PresentationCreateOptions() {Path = myFile, CreateNew = true, ConflictResolution = ConflictBehavior.Replace })) + { + + } + + Console.WriteLine($"File {myFile} created: {File.Exists(myFile)}"); + + using (var ppt = powerpoint.UsePresentationDocument(new PresentationCreateOptions() {Path = myFile, ConflictResolution = ConflictBehavior.Replace })) + { + ppt.AddNewSlide("Blank"); + } + + //Use template + using (var ppt = powerpoint.UsePresentationDocument(new PresentationCreateOptions() {Path = myFile, ConflictResolution = ConflictBehavior.Replace, TemplatePath = "New Microsoft PowerPoint Presentation.pptx" })) + { + ppt.AddNewSlide("Blank"); + } + + //Use existing + using (var ppt = powerpoint.UsePresentationDocument(new PresentationCreateOptions() {Path = myFile, ConflictResolution = ConflictBehavior.Skip })) + { + ppt.AddNewSlide("Blank"); + } + + try + { + using var ppt = powerpoint.UsePresentationDocument(new PresentationCreateOptions() {Path = myFile, ConflictResolution = ConflictBehavior.Fail }); + } + catch + { + Console.WriteLine("Expected exception due to conflict resolution"); + } + } + } +} \ No newline at end of file diff --git a/CodedPowerPointDemo/project.json b/CodedPowerPointDemo/project.json index 869a044..144dad6 100644 --- a/CodedPowerPointDemo/project.json +++ b/CodedPowerPointDemo/project.json @@ -1,105 +1,110 @@ -{ - "name": "PowerPointCoded", - "projectId": "9706ad05-bf1f-4ef3-8cad-dfa1e1d5dfd2", - "description": "Blank Process", - "main": "Main.xaml", - "dependencies": { - "UiPath.Excel.Activities": "[2.23.3-alpha.5359193]", - "UiPath.Mail.Activities": "[1.22.1]", - "UiPath.Presentations.Activities": "[1.14.0-preview]", - "UiPath.System.Activities": "[24.2.0-preview]", - "UiPath.Testing.Activities": "[23.10.0]", - "UiPath.UIAutomation.Activities": "[23.10.7]" - }, - "webServices": [], - "entitiesStores": [], - "schemaVersion": "4.0", - "studioVersion": "24.4.0.0", - "projectVersion": "1.0.0", - "runtimeOptions": { - "autoDispose": false, - "netFrameworkLazyLoading": false, - "isPausable": true, - "isAttended": false, - "requiresUserInteraction": true, - "supportsPersistence": false, - "workflowSerialization": "DataContract", - "excludedLoggedData": [ - "Private:*", - "*password*" - ], - "executionType": "Workflow", - "readyForPiP": false, - "startsInPiP": false, - "mustRestoreAllDependencies": true, - "pipType": "ChildSession" - }, - "designOptions": { - "projectProfile": "Developement", - "outputType": "Process", - "libraryOptions": { - "includeOriginalXaml": false, - "privateWorkflows": [] - }, - "processOptions": { - "ignoredFiles": [] - }, - "fileInfoCollection": [], - "saveToCloud": false - }, - "expressionLanguage": "VisualBasic", - "entryPoints": [ - { - "filePath": "Main.xaml", - "uniqueId": "bff2f7b4-7208-4e15-95d7-066e03d9a08f", - "input": [], - "output": [] - }, - { - "filePath": "ReplaceTextInPresentation.cs", - "uniqueId": "7f1bbf3d-dba4-4e17-9405-1646d7aea518", - "input": [], - "output": [] - }, - { - "filePath": "AddNewSlide.cs", - "uniqueId": "366b610f-8e8a-42e3-a314-931255c5106b", - "input": [], - "output": [] - }, - { - "filePath": "AddText2Slide.cs", - "uniqueId": "f4db610c-e5fa-4cad-8f84-d221341181a9", - "input": [], - "output": [] - }, - { - "filePath": "FormatSlideContent.cs", - "uniqueId": "c9c0a7f0-4b81-4b68-9653-44f9f01ac7c2", - "input": [], - "output": [] - }, - { - "filePath": "DeleteSlide.cs", - "uniqueId": "101b70d7-134c-4568-a688-8539fabf4983", - "input": [], - "output": [] - }, - { - "filePath": "AddFile2Slide.cs", - "uniqueId": "e9091977-b0c1-463c-9441-6784e8e890c5", - "input": [], - "output": [] - }, - { - "filePath": "AddImageOrVideo2Slide.cs", - "uniqueId": "45b13a10-1150-4481-9787-3bf07c133cbb", - "input": [], - "output": [] - } - ], - "isTemplate": false, - "templateProjectData": {}, - "publishData": {}, - "targetFramework": "Windows" +{ + "name": "PowerPointCoded", + "projectId": "9706ad05-bf1f-4ef3-8cad-dfa1e1d5dfd2", + "description": "Blank Process", + "main": "Main.xaml", + "dependencies": { + "UiPath.Excel.Activities": "[3.3.1]", + "UiPath.Mail.Activities": "[2.7.10]", + "UiPath.Presentations.Activities": "[2.4.1]", + "UiPath.System.Activities": "[25.12.2]", + "UiPath.Testing.Activities": "[25.10.1]", + "UiPath.UIAutomation.Activities": "[25.10.27]" + }, + "webServices": [], + "entitiesStores": [], + "schemaVersion": "4.0", + "studioVersion": "24.4.0.0", + "projectVersion": "1.0.0", + "runtimeOptions": { + "autoDispose": false, + "netFrameworkLazyLoading": false, + "isPausable": true, + "isAttended": false, + "requiresUserInteraction": true, + "supportsPersistence": false, + "workflowSerialization": "DataContract", + "excludedLoggedData": [ + "Private:*", + "*password*" + ], + "executionType": "Workflow", + "readyForPiP": false, + "startsInPiP": false, + "mustRestoreAllDependencies": true, + "pipType": "ChildSession" + }, + "designOptions": { + "projectProfile": "Developement", + "outputType": "Process", + "libraryOptions": { + "privateWorkflows": [] + }, + "processOptions": { + "ignoredFiles": [] + }, + "fileInfoCollection": [], + "saveToCloud": false + }, + "expressionLanguage": "VisualBasic", + "entryPoints": [ + { + "filePath": "Main.xaml", + "uniqueId": "bff2f7b4-7208-4e15-95d7-066e03d9a08f", + "input": [], + "output": [] + }, + { + "filePath": "ReplaceTextInPresentation.cs", + "uniqueId": "7f1bbf3d-dba4-4e17-9405-1646d7aea518", + "input": [], + "output": [] + }, + { + "filePath": "AddNewSlide.cs", + "uniqueId": "366b610f-8e8a-42e3-a314-931255c5106b", + "input": [], + "output": [] + }, + { + "filePath": "AddText2Slide.cs", + "uniqueId": "f4db610c-e5fa-4cad-8f84-d221341181a9", + "input": [], + "output": [] + }, + { + "filePath": "FormatSlideContent.cs", + "uniqueId": "c9c0a7f0-4b81-4b68-9653-44f9f01ac7c2", + "input": [], + "output": [] + }, + { + "filePath": "DeleteSlide.cs", + "uniqueId": "101b70d7-134c-4568-a688-8539fabf4983", + "input": [], + "output": [] + }, + { + "filePath": "AddFile2Slide.cs", + "uniqueId": "e9091977-b0c1-463c-9441-6784e8e890c5", + "input": [], + "output": [] + }, + { + "filePath": "AddImageOrVideo2Slide.cs", + "uniqueId": "45b13a10-1150-4481-9787-3bf07c133cbb", + "input": [], + "output": [] + }, + { + "filePath": "CreateNewDocument.cs", + "uniqueId": "dd0dbdd0-ef63-4d57-89fa-437d510f8ff8", + "input": [], + "output": [] + } + ], + "isTemplate": false, + "templateProjectData": {}, + "publishData": {}, + "targetFramework": "Windows" } \ No newline at end of file diff --git a/CodedWordDemo/.project/PackageBindingsMetadata.json b/CodedWordDemo/.project/PackageBindingsMetadata.json index 712ff9e..2faacb9 100644 --- a/CodedWordDemo/.project/PackageBindingsMetadata.json +++ b/CodedWordDemo/.project/PackageBindingsMetadata.json @@ -1,11 +1,11 @@ { "ActivityBindings": { - "UiPath.Core.Activities.AddAndProcessQueueItem": [ + "UiPath.Activities.System.Jobs.RunJob": [ { - "Type": "queue", + "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -14,20 +14,42 @@ "ValueSource": "Property" }, "name": { - "Value": "QueueType", + "Value": "ProcessName", "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } ], + "UiPath.Core.Activities.AddAndProcessQueueItem": [ + { + "Type": "queue", + "Values": { + "name": { + "Value": "QueueType", + "ValueSource": "Property" + }, + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], "UiPath.Core.Activities.AddQueueItem": [ { "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -40,6 +62,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -49,7 +77,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -62,6 +90,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -87,7 +121,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -100,6 +134,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -107,15 +147,37 @@ "UiPath.Core.Activities.DeleteQueueItems": [ { "Type": "queue", + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } + }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.EvaluateBusinessRule": [ + { + "Type": "businessRule", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" + }, + "name": { + "Value": "BusinessRule", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -125,19 +187,13 @@ "UiPath.Core.Activities.GetJobs": [ { "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.GetQueueItem": [ @@ -145,7 +201,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -158,6 +214,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -167,7 +229,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -180,6 +242,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -189,7 +257,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -202,6 +270,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -211,7 +285,35 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Core.Activities.GetSecret": [ + { + "Type": "asset", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -224,6 +326,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -249,7 +357,7 @@ "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -262,6 +370,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -269,19 +383,13 @@ "UiPath.Core.Activities.PostponeTransactionItem": [ { "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.QueueTrigger": [ @@ -314,6 +422,10 @@ "MaxJobsForActivation": { "Value": "MaxJobsForActivation", "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -325,7 +437,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -338,6 +450,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -347,7 +465,7 @@ "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -360,44 +478,66 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } ], - "UiPath.Core.Activities.SetTransactionProgress": [ + "UiPath.Core.Activities.SetSecret": [ { - "Type": "queue", + "Type": "asset", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" + }, + "name": { + "Value": "AssetName", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" } }, "SubBindings": [], "DefaultValueSource": "Property" } ], - "UiPath.Core.Activities.SetTransactionStatus": [ + "UiPath.Core.Activities.SetTransactionProgress": [ { "Type": "queue", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" + "Values": { + "folderPath": { + "Value": "FolderPath", + "ValueSource": "Property" + } }, + "DefaultValueSource": "Default" + } + ], + "UiPath.Core.Activities.SetTransactionStatus": [ + { + "Type": "queue", "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.StartJob": [ @@ -405,7 +545,7 @@ "Type": "process", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -418,6 +558,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -425,19 +571,13 @@ "UiPath.Core.Activities.StopJob": [ { "Type": "process", - "PublishNullValues": false, - "Key": { - "Value": "N/A", - "ValueSource": "Property" - }, "Values": { "folderPath": { "Value": "FolderPath", "ValueSource": "Property" } }, - "SubBindings": [], - "DefaultValueSource": "Property" + "DefaultValueSource": "Default" } ], "UiPath.Core.Activities.Storage.DeleteStorageFile": [ @@ -445,7 +585,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -458,6 +598,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -467,7 +613,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -480,6 +626,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -489,7 +641,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -502,6 +654,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -511,7 +669,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -524,6 +682,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -533,7 +697,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -546,6 +710,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -555,7 +725,7 @@ "Type": "bucket", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -568,6 +738,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -589,6 +765,10 @@ "CronExpression": { "Value": "CronExpression", "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" } }, "SubBindings": [], @@ -600,7 +780,7 @@ "Type": "queue", "PublishNullValues": false, "Key": { - "Value": "N/A", + "Value": "BindingsKey", "ValueSource": "Property" }, "Values": { @@ -613,6 +793,12 @@ "ValueSource": "Property" } }, + "Arguments": { + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + } + }, "SubBindings": [], "DefaultValueSource": "Property" } @@ -728,6 +914,257 @@ }, "DefaultValueSource": "Default" } + ], + "UiPath.Mail.Activities.IMAP.NewIMAPEmailReceivedTrigger": [ + { + "Type": "EventTrigger", + "PublishNullValues": false, + "Key": { + "Value": "BindingsKey", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "Connector", + "ValueSource": "Property" + }, + "FilterExpression": { + "Value": "FilterExpression", + "ValueSource": "Property" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "Operation": { + "Value": "Operation", + "ValueSource": "Property" + } + }, + "SubBindings": [ + { + "Type": "Property", + "PublishNullValues": false, + "Key": { + "Value": "MailFolderBindingsKey", + "ValueSource": "Property" + }, + "Values": { + "folder": { + "Value": "MailFolder", + "ValueSource": "Property" + } + }, + "Arguments": { + "ActivityName": { + "Value": "DisplayName", + "ValueSource": "Property" + }, + "BindingsVersion": { + "Value": "2.2", + "ValueSource": "Constant" + }, + "ObjectName": { + "Value": "ObjectName", + "ValueSource": "Property" + }, + "DisplayLabel": { + "Value": "folder", + "ValueSource": "Constant" + }, + "PrimaryKey": { + "Value": "folder", + "ValueSource": "Constant" + }, + "TriggerCreateParameters": { + "Value": "folder", + "ValueSource": "Constant" + }, + "Overwritable": { + "Value": "false", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.DeleteImapMailMessage": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.GetIMAPMailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.IMAP.Activities.MoveIMAPMailMessageToFolder": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.POP3.Activities.GetPOP3MailMessages": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } + ], + "UiPath.Mail.SMTP.Activities.SendMail": [ + { + "Type": "Connection", + "PublishNullValues": false, + "Key": { + "Value": "ConnectionId", + "ValueSource": "Property" + }, + "Values": { + "ConnectionId": { + "Value": "ConnectionId", + "ValueSource": "Property" + } + }, + "Arguments": { + "BindingsVersion": { + "Value": "2.1", + "ValueSource": "Constant" + }, + "Connector": { + "Value": "uipath-mail-mail", + "ValueSource": "Constant" + }, + "UseConnectionService": { + "Value": "True", + "ValueSource": "Constant" + } + }, + "SubBindings": [], + "DefaultValueSource": "Property" + } ] } } \ No newline at end of file diff --git a/CodedWordDemo/.project/design.json b/CodedWordDemo/.project/design.json index fab6835..206a9f3 100644 --- a/CodedWordDemo/.project/design.json +++ b/CodedWordDemo/.project/design.json @@ -1,5 +1,6 @@ { "Tags": [], "SeparateRuntimeDependencies": true, - "IncludeSources": true + "IncludeSources": true, + "ConnectorKeys": [] } \ No newline at end of file diff --git a/CodedWordDemo/CreateNewDocument.cs b/CodedWordDemo/CreateNewDocument.cs new file mode 100644 index 0000000..52d7aec --- /dev/null +++ b/CodedWordDemo/CreateNewDocument.cs @@ -0,0 +1,80 @@ +using CodedWordDemo.ObjectRepository; +using System; +using System.Collections.Generic; +using System.Data; +using UiPath.Activities.System.Jobs.Coded; +using UiPath.CodedWorkflows; +using UiPath.Core; +using UiPath.Core.Activities.Storage; +using UiPath.Excel; +using UiPath.Excel.Activities; +using UiPath.Excel.Activities.API; +using UiPath.Excel.Activities.API.Models; +using UiPath.Mail.Activities.Api; +using UiPath.Orchestrator.Client.Models; +using UiPath.Testing; +using UiPath.Testing.Activities.Api.Models; +using UiPath.Testing.Activities.Models; +using UiPath.Testing.Activities.TestData; +using UiPath.Testing.Activities.TestDataQueues.Enums; +using UiPath.Testing.Enums; +using UiPath.UIAutomationNext.API.Contracts; +using UiPath.UIAutomationNext.API.Models; +using UiPath.UIAutomationNext.Enums; +using UiPath.Word; +using UiPath.Word.Activities; +using UiPath.Word.Activities.API; +using UiPath.Word.Activities.API.Models; +using System.IO; + +namespace CodedWordDemo +{ + public class CreateNewDocument : CodedWorkflow + { + [Workflow] + public void Execute() + { + //Open existing file + using (var wd = word.UseDocument("CodedTestFiles/docWithTextAndImage.docx")) + { + var text = wd.ReadText(); + Console.WriteLine($"Read text {text}"); + } + + var myFile = "myNewFile.docx"; + if (File.Exists(myFile)) + File.Delete(myFile); + + using (var wd = word.UseDocument(new DocumentOptions() {Path = myFile, CreateNew = true})) + { + var text = wd.ReadText(); + Console.WriteLine($"Read text {text}"); + } + + Console.WriteLine($"File {myFile} created: {File.Exists(myFile)}"); + + using (var wd = word.UseDocument(new DocumentOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Replace})) + { + var text = wd.ReadText(); + Console.WriteLine($"Read text {text}"); + wd.AppendText($"{System.DateTime.Now}"); + } + + using (var wd = word.UseDocument(new DocumentOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Skip})) + { + var text = wd.ReadText(); + Console.WriteLine($"Read text {text}"); + wd.AppendText($"{System.DateTime.Now}"); + } + + try + { + using var wd = word.UseDocument(new DocumentOptions() {Path = myFile, CreateNew = true, ConflictBehavior = ConflictBehavior.Fail}); + } + catch + { + Console.WriteLine("Expected exception here since conflict resolution is set to fail"); + } + } + } +} \ No newline at end of file diff --git a/CodedWordDemo/project.json b/CodedWordDemo/project.json index 5ebcc90..976fc06 100644 --- a/CodedWordDemo/project.json +++ b/CodedWordDemo/project.json @@ -4,12 +4,12 @@ "description": "Blank Process", "main": "Main.xaml", "dependencies": { - "UiPath.Excel.Activities": "[2.23.4-beta.6017090]", - "UiPath.Mail.Activities": "[1.23.1]", - "UiPath.System.Activities": "[24.5.0-preview]", - "UiPath.Testing.Activities": "[24.10.0-preview]", - "UiPath.UIAutomation.Activities": "[24.10.0-preview]", - "UiPath.Word.Activities": "[1.20.0-alpha.6268437]" + "UiPath.Excel.Activities": "[3.3.1]", + "UiPath.Mail.Activities": "[2.7.10]", + "UiPath.System.Activities": "[25.12.2]", + "UiPath.Testing.Activities": "[25.10.1]", + "UiPath.UIAutomation.Activities": "[25.10.27]", + "UiPath.Word.Activities": "[2.4.1]" }, "webServices": [], "entitiesStores": [], @@ -38,7 +38,6 @@ "projectProfile": "Developement", "outputType": "Process", "libraryOptions": { - "includeOriginalXaml": false, "privateWorkflows": [] }, "processOptions": { @@ -78,6 +77,12 @@ "uniqueId": "c0753c38-9b77-4e6e-bdf3-036494660d0c", "input": [], "output": [] + }, + { + "filePath": "CreateNewDocument.cs", + "uniqueId": "c32b9d4f-8a7b-492f-8394-f34e4c363da5", + "input": [], + "output": [] } ], "isTemplate": false,