PDA

View Full Version : import txt. file to excel with vba



lika86
03-11-2014, 11:54 AM
< Current Production Information >>

* Selected PCB : C:\SmartSM\PCB\2.4.2013 KL.SENSOR.opt
* Selected Date : 20130402_214823

* Total Board : 6[EA]
* Skipped PCB : 0[EA]
* Worked PCB : 504[EA]

* Run Time : 0:42:17(2537 sec)
* Place Time : 0:41:41(2501 sec)
* Transfer Time : 0:00:26(26 sec)
* Entry Wait : 0:00:10(10 sec)
* Exit Wait : 0:00:00(0 sec)
* Stop Time : 0:00:16(16 sec)

* Peak Build Time: 0.0[sec/board] 0[Board/Hour] 0[Chip/Hour]
* Mean Build Time: 416.8[sec/board] 8[Board/Hour] 10882[Chip/Hour]
* Previous Cycle : 427.6[sec/board]
* - Build Time : 423.4[sec]
* - Tranfer Time : 4.2[sec]


< Head Information >
---------------------------------------------------------------------------------------------------------------------------
"Item" "Pickup" "Place" "Error" "Error(PPM)" "Pick Miss" "Part NG" "Dump"
---------------------------------------------------------------------------------------------------------------------------
# 1 1260 1260 0 0 0 0 0
# 2 1260 1260 0 0 0 0 0
# 3 1260 1260 0 0 0 0 0
# 4 1260 1260 0 0 0 0 0
# 5 1260 1260 0 0 0 0 0
# 6 1260 1260 0 0 0 0 0
# 7 0 0 0 0 0 0 0
# 8 0 0 0 0 0 0 0
# 9 0 0 0 0 0 0 0
#10 0 0 0 0 0 0 0
#11 0 0 0 0 0 0 0
#12 0 0 0 0 0 0 0
---------------------------------------------------------------------------------------------------------------------------
Total 7560 7560 0 0 0 0 0
-----------------------------------------------------------------------------------I have a lot of txt. files you would like to imported automatically via VBA code
text file is always the same need only certain data
in these two rows which is the red just want this data



it is copied from txt. files in Excel so that I had with the click of a button you obtain all the information and through this button you looking for the folder in which the data
next would have 2 lines one would be the computer name of one folder and the user can more
This would also be the folder in which the data were computer name to the main folder subfolder, users, and wanted to let me read the particulars of which are in the name of the computer and the user.
for example. computer name of the user


i have in excel what i need undefined11385