导入文本文件 [英] Importing Text File

查看:74
本文介绍了导入文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到将文本文件导入Access的问题。文本文件

将使用分隔符导入,例如(,)。这应该将

导入数据库。一个例子是:


John,是,男孩

Ada,是,a,女孩


我尝试过使用DoCmd.TransferText,但我没有得到结果。

解决方案

hendafe写道:

我有一个将文本文件导入Access的问题。文本文件
将使用分隔符导入,例如(,)。这应该导入数据库。一个例子是:

John,是,a,男孩
Ada,是,a,女孩

我尝试过使用DoCmd.TransferText,但我不是获得结果。



如果您使用访问文件 - 获取外部数据 - 导入命令,您可以指定使用哪个分隔符(如果有)。当你这么做时,仔细观察

这个。


Bob


" hendafe" <他***** @ yahoo.com>在消息中写道

news:11 ********************** @ g43g2000cwa.googlegr oups.com ...

我有一个将文本文件导入Access的问题。文本文件
将使用分隔符导入,例如(,)。


只是为了迂腐,(,)是一个分隔符。不是分隔符。

分隔符(如果使用的话)通常是围绕文本的双引号。

文本字段周围需要分隔符,以便逗号可以包含在

文本。例如

....,24 John Street,Bay Village,...

这应该导入数据库。



这是什么意思?你想要将逗号导入到数据库中吗?

呢?

如果是这样,TransferText可能就没有了。


我尝试在File

菜单中使用Get External Data - Import命令,它运行得非常好。

问题,这些文字文件经常被添加到特定的

文件夹中,不止一个。

我希望能够遍历这个文件夹并导入整个

他们进入一张桌子。

这应该通过表格来完成,点击一个命令按钮。

任何帮助


I have a problem of importing a text file into Access. The text file
will be imported using a delimiter, say ( , ) for example. This should
be imported into the database. An example is:

John, is, a, boy
Ada, is, a, girl

I have tried using the DoCmd.TransferText but I am not getting results.

解决方案

hendafe wrote:

I have a problem of importing a text file into Access. The text file
will be imported using a delimiter, say ( , ) for example. This should
be imported into the database. An example is:

John, is, a, boy
Ada, is, a, girl

I have tried using the DoCmd.TransferText but I am not getting results.


If you use the Access File - Get External Data - Import command, you can
specify what delimiter, if any is to be used. Look closely when you do
this.

Bob


"hendafe" <he*****@yahoo.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...

I have a problem of importing a text file into Access. The text file
will be imported using a delimiter, say ( , ) for example.
Just to be pedantic, ( , ) is a "separator" not a delimiter.
A delimiter, if used, is usually double-quotes surrounding text.
Delimiters are needed around text fields so that commas can be included in
the text. eg
.... , "24 John Street, Bay Village", ...
This should be imported into the database.



What did that mean? Do you want the commas to be imported into the database
too?
If so, TransferText may not be the way to go.


I have tried using the Get External Data - Import command in the File
menu, and it is working perfectly well.
The problem, these text files are frequently added into a particular
folder, more than one.
I want to be able to loop through this folder and import the whole of
them into a table.
This should be done through a form, by clicking a command button.
Any help with that


这篇关于导入文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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