LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Assitsance with writing macro to import text report into Excel

I have a text report that I would like to import into Excel. The problem,
however, is that the report consists of a header and then detail rows. Below
is a sample of 1 section from of the text report (each report will contain
many sections similar to this):

BATCH REPORT 2002/12/31 08:15:45 PM
Formula: 1234A (PRODUCT ABCDEFGHIJK) Client: J.SOAP MixInstr: 456
B.Run ID: 890 Dest.Bin: 01 P.Code: M Density: 600 Mol: 1.0%
No.Batches: 6/6 B.Size: 2.00 Tons Operator: ORIE-998
Material Bin SP ACT
5800 INGREDIENT 1a 3.00 3.00
1050 INGREDIENT 7a 2.40 2.40
975 INGREDIENT 6a 3.10 3.10
923 INGREDIENT 4a 4.00 4.00
929 INGREDIENT 41 13.00 13.00
1 3 INGREDIENT 42 1295.44 1292.00
203 6 INGREDIENT 43 215.00 217.00
910 7 INGREDIENT 6b 189.00 187.00
211 8 INGREDIENT 8j 252.00 251.00
823 ML INGREDIENT 6h 20.00 20.00
1006 L2 INGREDIENT 3f 2.26 2.30
5900 L3 INGREDIENT 2x 0.80 0.83
------- -------
TOTAL BATCH WEIGHT: 2000.00 1995.62

I would like to import the above information into an Excel spreadsheet,
using a macro that will parse the data into columns in the following format:
The header information for each section would be imported into columns A - M
(and would be the same for each of the detail rows). The data in the detail
rows would then be imported into columns N - S.

Is this possible using Micrsoft Office and Windows XP? If so, please can
someone provide me with what functionality I should be using.
The problem with the text is that the header row/(s) need to be parsed based
on keywords (e.g. Formula, P.Code, etc) and the detail
needs to be parsed on a fixed-width basis.

Any assistance/pointers would be greatly appreciated.

Many thanks in advance for all your help
 
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
Question on report writing. doss04 Excel Discussion (Misc queries) 0 November 2nd 08 06:34 AM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Excel 2007 Problems; in writing macro and convert text to colums bezl Excel Discussion (Misc queries) 2 December 22nd 06 11:20 AM
import excel data into existing excel report Viggoros Excel Worksheet Functions 1 January 11th 06 03:29 PM
Text Import Macro Help Obbly Excel Programming 1 October 12th 04 09:16 PM


All times are GMT +1. The time now is 11:48 PM.

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"