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: 10
Default import file programatically

I have a text file that is not in a state to just import i.e. the data is
not in columns - the job no is centred on the document and there are
underlines that I don't want importing
eg

Postion 50 Line 1: Job No: 1234567
Postion 1 Line 2: Analysis Code (len 5)
Position 35 Line 2: Cost (99999999.99)
Position 63 Line 2: Sales (99999999.99)

The lines to be imported always start with a 0 or a 7 except for the Job No.

How can I programmatically import this file so that it gives me 4 columns
Col 1 = Job No
Col 2 = Analysis Code
Col 3 = Cost or Sales


The job No needs to be repeated in col 1 on each line until the next job no
is found.

Thanks

The file looks like this
Job No: 1234567
00123 99.99
00356 100.99
70000 1000.00

I would like the import to look like this:
1234567 00123 99.99
1234567 00356 100.99
1234567 70000 1000.00



 
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
programatically selecting columns to import text into ScottM Excel Discussion (Misc queries) 2 November 25th 05 05:41 PM
Programatically close a file without saving [email protected] Excel Programming 2 December 26th 04 01:23 AM
Creating a PDF file programatically from Excel Chaplain Doug Excel Discussion (Misc queries) 0 December 16th 04 08:49 PM
Programatically saving an excel .csv file to .xls file... Pai Excel Programming 1 December 2nd 03 05:18 AM
Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules JMMach Excel Programming 7 October 21st 03 08:46 PM


All times are GMT +1. The time now is 06:22 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"