|
查看: 961|回复: 7
|
读CSV file 去 txt file
[复制链接]
|
|
|
请问,有谁会,读csv file 然后写进txt file,
首先,我会read data from csv file to datagrid ,
然后,我需要compare datagrid 里面的data和一些data from database
然后才写进txt file
现在的问题是
怎样知道datagrid 的value是指那一个column?
so that, i can make comparison between specified column of data grid with the columns in database
还有怎样loop and write into txt file
有什么idea吗?有谁会吗? |
|
|
|
|
|
|
|
|
|
|
发表于 26-4-2008 11:58 AM
|
显示全部楼层
|
CSV文件本来就是txt了。他用逗号分割数据而已。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 26-4-2008 03:00 PM
|
显示全部楼层
我知道
但是, 我必须这样做,因为我需要做一些table comparison才能放回txt file |
|
|
|
|
|
|
|
|
|
|
发表于 29-4-2008 10:56 AM
|
显示全部楼层
原帖由 stephanie83 于 26-4-2008 12:51 AM 发表 
请问,有谁会,读csv file 然后写进txt file,
首先,我会read data from csv file to datagrid ,
然后,我需要compare datagrid 里面的data和一些data from database
然后才写进txt file
现在的问题是
怎样知道 ...
你是 指 。net 的 datagrid ? 那个只是 用来 display data (viewing purpose)
data 是在 datatable 里。。。 |
|
|
|
|
|
|
|
|
|
|
发表于 29-4-2008 11:15 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 29-4-2008 11:33 AM
|
显示全部楼层
我觉得,把datagrid load去datatable, 然后用datatable来做comparison. |
|
|
|
|
|
|
|
|
|
|
发表于 29-4-2008 11:16 PM
|
显示全部楼层
我是compare data from database.
我都是import 了,然后用query 来compare 再export. |
|
|
|
|
|
|
|
|
|
|
发表于 6-5-2008 10:08 AM
|
显示全部楼层
原帖由 evo9 于 29/4/2008 23:16 发表 
我是compare data from database.
我都是import 了,然后用query 来compare 再export.
可以 share 一下如何 import 吗?我在找着 asp vbscript 的 imports function.
是不是一定要 upload 那 cvs 去 server, 然后才从那里读? |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|