1.解压缩
invoke mothod有压缩和解压缩方法(使用方法:target type=system.io.compression.zipfile,MethodName=extracttodirectory,参数传入两个string格式路径),但客户开发环境就是不成功,一直报错(could not load file and assembly:0x80131040)
我尝试了很多办法,包括但不限于安装新版本.net,替换多个地方的zipfile.dll,用invoke code的system.IO.compression.zipfile.extracttodirectory(),均无法解决,翻遍uipath论坛,别人的xaml在自己电脑上能跑,放在开发环境就挂。
最后用vba解决,安装7zip,invoke code里写shell(7z路径+“ x ”+压缩文件路径+“ -o”+解压缩路径,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报错
error opening workbook,make sure excel is installed.
在跟客户上线项目的时候生产环境突然爆出这个错误,差点翻车。原来生产环境曾经装了两个excel,有一个卸载不干净,最后卸载全部office软件重装一次解决问题。
4.Windows credential设置密码读取config