Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default MAKE A EXCEL LOG SHEET FROM TEXT FILES (10000+ FILEs)

Hi,


I have a folder containing system generated log files around 10000.
Each has a detail file also & it is tiresome to complie all from
detail in one sheet. I think I can get same from these log files
instead.
These are five line files starting at start of file & ending at ----
end----. Below is a sample.

Start of file
Report:VOORD.LOG.20080901.1621 Start:01.09.2008 17:38 End:01.09.2008
17:45 01.09.2008
000001096300001 Order: 0200 Pack Gen.: 0200 Pack 0004291833 to
0004292832 Gen.Vou: 100000 20080901
Message:O.K.
-------------- E N D --------------


I want to compile a log sheet in excel of such multiple files placed
in a folder. I should be able to browse to the folder & select all the
files. The script will cycle through all the files and get the below
required in an excel file.
Below are the requirement:


In second line, after "LOG."date of file is mentioned [Example:
20080901].
Required format of date is dd-mmm-yyyy (01-SEP-2008)

In third line, detect fifteen len number [Example: 000001096300001]
Required is V0963001 (remove first 6 from left, add alphabet "V"(upper
case) to the left, remove 2 zeros at 11th & 12th position and combine
remaining two from right forming V0963001

In third line, detect two ten len numbers [Example: 0004291833 to
0004292832]
Required is "000429183300" and "000429283299".
Add "00" to first number & add "99" to second number from right.

Excel log sheet format is as follows:
(Sort ascending "Start#")

S# File# Base# Start# End#
Quantity VG# Date
1. V0963001 000429183300 000429283299
100000 01-SEP-2008
2. and so on for rest of the files.
3. and so on for rest of the files.
4. and so on for rest of the files.


A macro solution would be much appreciated.
Thx.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel (xls) files spontaneously converting to text files Be-jamin Excel Discussion (Misc queries) 0 November 18th 08 05:31 PM
Make one excel sheet from multiple text files cosva Excel Programming 2 March 5th 07 05:36 PM
Make one excel sheet from multiple text files cosva Excel Programming 1 March 5th 07 03:01 PM
How can I make Excel Files save as the text appers in a cell, can. I khan Excel Discussion (Misc queries) 1 February 1st 05 07:34 PM
importing a lot of text files to excel sheet at one go vikram Excel Programming 2 April 29th 04 06:23 PM


All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"