VBA:具有两个工作簿的匹配功能

时间:2019-05-17 04:03:38

标签: excel vba

我想查看一个工作簿的A列中的值是否在另一工作簿的A列中(然后返回该行)。但是,我坚持使用比赛。

我尝试了使用match函数的不同方法,首先是使用引用,然后我只是键入一个数字进行匹配。问题是:只要打开当前工作簿(tofind = set(['Device/@product']) for Device in root.findall('Device'): for product in tofind: node = Device.find('Plex Media Server') if node is not None: print ('Found uri') else: print ('Unable to find uri') print(Device.attrib) ),它总是在其中寻找值。当我关闭它时,它将在我想要的主文件(Unable to find uri Unable to find uri {'name': 'TV', 'product': 'Plex for Samsung', 'productVersion': '2.012', 'platform': 'Samsung', 'platformVersion': '5.1', 'device': 'Samsung TV', 'clientIdentifier': 'xxx', 'createdAt': '', 'lastSeenAt': '', 'provides': 'client,player,pubsub-player', 'owned': '1', 'publicAddress': '', 'publicAddressMatches': '0', 'presence': '0', 'accessToken': ''} )中查找。

wbCurr

0 个答案:

没有答案