将.csv文件导入到数据表VB.NET中 [英] Importing .csv file into a datatable VB.NET
本文介绍了将.csv文件导入到数据表VB.NET中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我访问网站时,你如何告诉你要导入的.csv文件没有行
标题 http://www.connectionstrings.com/ 并在
文本文件中说:
HDR =是;表示第一行包含列名,而不是数据
所以我做了HDR =否但这不起作用。
How do you tell the .csv file that you are to import that it has no row
headers as I went to the web site http://www.connectionstrings.com/ and under
text file it says:
"HDR=Yes;" indicates that the first row contains columnnames, not data
So i have done HDR=No but this does not work as.
推荐答案
Jonathan,
我没试过,但是你试着不使用那个参数。
Cor
Jonathan,
I did not try it however did you try not to use that parameter.
Cor
2005年3月15日星期二09:33:04 -0800,Jonathan <乔****** @ discussions.microsoft.com>写道:
$ b $b¤当我访问网站时,你如何告诉.csv文件你要导入它没有行
$ b $b¤标题 http://www.connectionstrings.com/ 和
¤文本文件说:
$ b $b¤
$ b $b¤HDR = Yes;表示第一行包含列名,而不是数据
$ b $b¤
$ b $b¤所以我做了HDR =否但这不起作用。
也许您可以发布文本文件结构的示例?
Paul
~~~~
Microsoft MVP(Visual Basic )
On Tue, 15 Mar 2005 09:33:04 -0800, "Jonathan" <Jo******@discussions.microsoft.com> wrote:
¤ How do you tell the .csv file that you are to import that it has no row
¤ headers as I went to the web site http://www.connectionstrings.com/ and under
¤ text file it says:
¤
¤ "HDR=Yes;" indicates that the first row contains columnnames, not data
¤
¤ So i have done HDR=No but this does not work as.
Perhaps you could post a sample of your text file structure?
Paul
~~~~
Microsoft MVP (Visual Basic)
Jonathan,使用HDR = No会得到什么样的结果?如果将其设置为No,则Access会将列名设置为:
Field1,Field2,Field3等。如果这不是您想要的,那么您必须设置列/字段名称在代码中。否则,
您将获得默认名称。
james
" Jonathan" <乔****** @ discussions.microsoft.com>在消息新闻中写道:E8 ********************************** @ microsof t.com ...
Jonathan, what kind of results do you get using HDR=No ? If you set it to No, then Access will set the Column Names to:
Field1, Field2, Field3 etc. If that is not what you want, then you will have to set the Column/Field Names in code. Otherwise,
you will get the default names.
james
"Jonathan" <Jo******@discussions.microsoft.com> wrote in message news:E8**********************************@microsof t.com...
当我访问网站时,你如何告诉你要导入的.csv文件没有行
标题 http://www.connectionstrings.com/ 并在
文本文件中说:
HDR =是;"表示第一行包含列名,而不是数据
所以我做了HDR =否但这不起作用。
How do you tell the .csv file that you are to import that it has no row
headers as I went to the web site http://www.connectionstrings.com/ and under
text file it says:
"HDR=Yes;" indicates that the first row contains columnnames, not data
So i have done HDR=No but this does not work as.
这篇关于将.csv文件导入到数据表VB.NET中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文