Problems encountered in UIpath development and their solutions

1. Unzip 

Invoke mothod has compression and decompression methods (use method: target type=system.io.compression.zipfile, MethodName=extracttodirectory, parameters are passed in two string format paths), but the customer development environment is unsuccessful, and always reports an error (could not load file and assembly:0x80131040)

I tried many methods, including but not limited to installing a new version of .net, replacing zipfile.dll in multiple places, and using system.IO.compression.zipfile.extracttodirectory() of invoke code, but they couldn’t be resolved. I searched the uipath forum. Other people's xaml can run on your own computer, and it hangs when you put it in the development environment.

Finally use vba to solve, install 7zip, and write shell in invoke code (7z path + "x" + compressed file path + "-o" + decompression path, vbhide)

 

2.linkedlist

ll=new linkedlist(of string)

ll.add/ll.addfirst

for each i in ll

dt.rows.add(i)

 

3. Excel Application Scope report error

error opening workbook,make sure excel is installed.

This error suddenly broke out in the production environment when I launched the project with the customer and almost overturned. It turned out that two excels were installed in the production environment, and one was uncleanly uninstalled. Finally, uninstall all the office software and reinstall it to solve the problem.

 

4. Windows credential set password read config

The customer has high requirements for project safety, and the VM connected to the production environment under the adopted robot mode does not allow user A to run the project of user B. We use windows credential management to control the robot reading config.

step

1) Install uipath.credential.activities package--necessary

2) Access the credential manager in the start menu and create it under generic credential under windows credential. The address is unique, the user name is arbitrary, and the password is the password accessed by writing config.

3) Open the config file, save f12 as, drop down tools, General Options, and enter the access password.

4) In the code, add get secure credential before reading config, the password is saved with a variable, and assign a string variable = new system.NET.NetworkCredential(String.Empty,psw).Password. The password becomes clear text. Add the string to the password when reading config.

 

5. Change the value of the row of the datatable through datarow in For each row

Use indexof to find the row number where the datarow is located: processDT.Rows(processDT.Rows.IndexOf(row))

Guess you like

Origin blog.csdn.net/weixin_31808811/article/details/89886218