如何将多个文本文件数据集导入到自己的表中。 [英] How to import multiple text file data sets into their own table.

查看:83
本文介绍了如何将多个文本文件数据集导入到自己的表中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从输出带有数据的文本文件的机器收集流量数据。

我想将每个文本文件作为自己的表导入Access数据库并且不必执行运行每个导入向导。


作为此函数的一部分,我想从数据集中删除前15行数据,在前5列中解析,并在第3行的信息之后命名该表,这是从中获取数据的街道的名称。


我知道这是一个很高的订单,但我希望有一个朝着正确的方向轻推。


我是Access的新手,可能通过一些VBA脚本知道这样的事情。

我已经包括原始数据集。



I collect traffic data from a machine that outputs text files with the data.
I want to import each text file as it''s own table into an Access database and do it without having to run the import wizard for each one.

As part of this function, I''d like to strip the first 15 lines of data from the dataset, parse in the first 5 columns, and name the table after the information on line 3 which is the name of the street the data was taken from.

I know this is a tall order but I''m hoping for a nudge in the right direction.

I''m new at Access and know something like this is possible probably through some VBA script.
I''ve included the original dataset.

附加文件
20100823_Kniveveien_detaljert.txt (222.5 KB,311 views)
Attached Files
20100823_Kniveveien_detaljert.txt (222.5 KB, 311 views)

推荐答案

Ive put为你使用一些代码。

要使用它,请使用txt文件的完整路径调用它,例如:
Ive put together some code for you.
To use it, call it with the full path of the txt file, for example:
展开 | 选择 | Wrap | 行号


你在丹麦?我在挪威。你的挪威语怎么样?

感谢你把它放在一起。现在我必须弄清楚如何运行它。在哪里坚持访问等等。感谢您的帮助。
You''re in Denmark? I''m in Norway. How''s your Norwegian?
Thanks for putting this together. Now I have to figure out exactly how to run it. Where to stick it into access etc. Thanks for your help.


是的,我在丹麦。

代码可能应该进入一个单独的模块。

欢迎光临。
Yes, I am in Denmark.
The code should probably go into a seperate module.
Your welcome.


这篇关于如何将多个文本文件数据集导入到自己的表中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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