![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 2
|
are there possible to open a text-file larger than 65000 lines and find out how many times a specific word accords in the text-file? and then inport thet number into exel.
need to make a progrem that reads large log-files. |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Feb 2002
Posts: 468
|
Yes BomZai it is possible
- go to the MS-DOS prompt - go to the folder with the large text file - enter the following command : FIND /N /I "word_to_search" file_to_search > import.txt example, search for the text 'www' in the text file 'internet.txt' : FIND /N /I "www" internet.txt > import.txt - then import this IMPORT.TXT into Excel _________________
[ This Message was edited by: Bruno on 2002-02-25 07:09 ] |
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
But I will stil get the problem because the hits are now about 58000 and stil growing. so this will only help me for a litle time.
im loking for a macro that does the job of counting the words.I made a macro that imports the lines from MSword an cheks for the selected word, but the macro is to slow. 5 hours to reed 70000 lines... |
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
I guess you are using a loop if so it will be SLOOOOOOW
Need to select the colum or row what ever and demand excel DOES as you require, but hard to say more without seeing / knowing what you really are dealing with. HTH PS can yoy not s[lit th log file into sheet 1 and 2>>>>
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#5 | |
|
Board Regular
Join Date: Feb 2002
Posts: 468
|
BomZai, if you only want to know the number of times a certain word occurs in a certain text file, you could try this :
- create new text file on your desktop - edit the text file a paste this code
- adjust the variables Source_file and Word_to_search - save the file - rename the file ending with .vbs (for example "Count.vbs") - now dubbleclick on this vbs-file to start it and wait... It requires some string manipulation so I don't know how long you will have to wait. Please let me know ? _________________
[ This Message was edited by: Bruno on 2002-02-26 00:41 ] |
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Feb 2002
Posts: 2
|
Thanx Bruno, it seems that this did solve my problem, It takes about 15 sec to scan trough the txt-file. And the macro works fine
Thanx again, you saved me for a lot of time... |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|