导入平面文本文件 [英] importing flat text files

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

问题描述

我有很多文本文件要导入EXCEL。它们是平面文件,我需要的数据在第1-3,10-12和365-371栏中。这些文件还有标题记录,这些记录混杂在1-3,4-12和12-25列中。


我还需要一种方法来加载文件作为MACRO的一部分,这样用户就可以减少问题。

I have many text files to import into EXCEL. They are flat files and the data I need is in columns 1-3, 10-12 and 365-371. The files also have header records that jumble up the columns 1-3, 4-12 and 12-25.

I also need a way to load the files as part of the MACRO so the users will have less problems.

推荐答案

你可以发一个小样本的文件吗?


在这个例子中,你可以表示标题在哪里混淆列。
Can you post a small sample of the file?

In the example can you denote where the header is jumbling the column.


这可能工作需要访问,然后进入exscel只有

应该把它放到excell
this might work take itto access and then in to exscel this will only work if
that should put it in to excell


另一种选择是你的VB / VBA代码读取文本文件并以CSV格式将其写回,然后将其导入Excel。另一方面,如果你要付出那么大的努力,我想你可以让你的代码读取文本文件并将数据放入工作表中。
Another option would be to have your VB/VBA code read the text file and write it back out in CSV format, then import it to Excel. On the other hand, if you''re going to go to that much effort, I suppose you could just have your code read the text file and place the data into the worksheet.


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

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