比较两个文本文件的上下文并创建第三个文件 [英] comparing context of two text files and create a 3rd file
本文介绍了比较两个文本文件的上下文并创建第三个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的客户有2个分隔的文本文件,一个文本文件具有名称,帐号,地址,第二个文件具有accno和金额,我想将两个文件进行比较,并创建具有excel格式的第三个文件(如果需要)所有字段
my client is having 2 delimited text files one text file haveing name,acc no, address and the second file having accno and amount i want to compare both the files and to create a third file(if needed) of excel format with all the fields
推荐答案
您可以将文件读取到数据表中,然后进行比较(前提是架构/数据格式相同).然后,您可以使用OleDbConnection或Interop将所需的数据写入excel文件.
You can read the files in to a data table and then compare it (provided the schema/data format are same). You can then write the required data to the excel files using OleDbConnection or Interop.
这篇关于比较两个文本文件的上下文并创建第三个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文