如何读取文件夹文件,同时读取excelfile并通过与文件夹文件比较来查找文件名并进行检查 [英] how to read a folder files and also same time excelfile and finding the names of files with comparing to folder files and check it

查看:64
本文介绍了如何读取文件夹文件,同时读取excelfile并通过与文件夹文件比较来查找文件名并进行检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何读取文件夹文件,同时读取excelfile并与文件夹文件进行比较来查找文件名,并检查是否找到消息显示为true,否则消息显示为false.

how to read a folder files and also same time excelfile and finding the names of files with comparing to folder files and check it if found message display true else messsage display false.

推荐答案

这听起来像是作业,所以我不会给你代码!

其实很简单:

1)从文件夹中读取文件(使用 Directory.GetFiles [
This sounds like homework, so I won''t give you code!

It''s pretty easy though:

1) Read the files from the folder (use the Directory.GetFiles[^] method)
2) Read the data from your excel file (use ODBC to connect and read the file)
3) Sort the file names in both lists.
4) Compare the lists.


这篇关于如何读取文件夹文件,同时读取excelfile并通过与文件夹文件比较来查找文件名并进行检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆