Login | |
|
 |
Read text file split lines for csv output - 1/8/2006 6:18:23 AM
|
|
 |
|
| |
ziminski
Posts: 79
Score: 2
Joined: 1/8/2006
Status: offline
|
How can I read a textfile and spllit each line based on a given format? Much the same way bcp uses a fmt file for importing data into a database. For example each line is 80 characters long, field 1 = 8, feild 2 = 2, feild 3 =20, field 4 = 15, feild 5 =15, feild 6 = 20 After spliting each line I need to insert a comma to make the file csv. So sample data in: 1234567812John jones At someplace soBeingsomthing Finalfeild lengh20 output 12345678,12,John jones , At someplace so,Beingsomthing , Finalfeild lengh20 , I need to loop thru every line in the file . Any ideas?
|
|
| |
|
|
|
 |
RE: Read text file split lines for csv output - 1/8/2006 3:21:42 PM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
Right, but he is creating CSV files not reading them. Cybex
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: Read text file split lines for csv output - 1/8/2006 4:58:33 PM
|
|
 |
|
| |
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
|
my apologies!
_____________________________
Have you searched here ? VBScript Fundamentals My Site
|
|
| |
|
|
|
|
|