Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
BristolBreeze
 
Posts: n/a
Default Changing a comma separated text file and save it.

Hello All,

I need some help on comma separated text files, changing them and
saving them.


I have got two text files.


The first file "ES_EF_AIG_20141440_105708_d.txt" has employee payment
record exactly like below:
"C0000000519","","","MR STEPHEN AGUTTER","10 COLCOKES
ROAD","BANSTEAD","SURREY","","","","","","SM7
2EW","MAL","AGUTTER","NS686159A","0000153363","CDN ","E","EMPLOYEE","29/10/2*001","","","","","","","","","AIG

EUROPE (UK) LTD","AIG CLAIMS
EXECUTIVE","","","","","","","","EEE","","GBR","GB R","","","SSS","23B","200*30601ES","01/06/2003","01/06/2006",355,+00000942525,0026550000,0000002108,0*002 5000,00000850000,034,000,0,0,0,,"",,"",,"",,"",,"" ,,"",,"",,"",,"",,"",,*"",,"",,"",,"",,"",,"",,"", ,"",,"",,"",0026550000,"",,,""



The main fields in this record for me a
1st field - "C0000000519"
54th field - 00025000
55th field - 00000850000
56th field - 034


The second file "ES_FE_AIG_20143416_142901_d.txt" is a payment file
with record exactly like below:
"C0000000519","","","NS686159A","0000153363","CDN" ,"E","EMPLOYEE","29/10/20*01","","","","","","","","AIG

EUROPE (UK) LTD","AIG CLAIMS
EXECUTIVE","","","","","","","","EEE","","GBR","GB R","","","SSS","23B","200*30601ES","01/06/2003","01/06/2006",0000002108,"

250.00","
8500.00",034,000,1208,10185844,"T",00001,"01/03/2006","ESPAY",001,034,"

250.00"," 0.00","","","","","CONTRIBSYS","
0.00000000",""


Once again the main fields in this record for me a
1st field - ("C0000000519")
50th field - " 250.00"


My task is to open the first file and, if there is a corresponding
record in the second file, then update the first file by removing one
payment and decrementing the total no. of payments by 1. In the above
example I want to basically change the 55th and 56th fields to
00000825000 and 033 respectively and save the file in the same format
(that is a csv text file).


I worked manually for the last two days on 60 files that are small
(with upto 20 records). Now there are exactly 60 files that have around

1000 records each.


Can someone please guide me in writing a code or please supply code for

the above. I tried opening both these files from Excel and then I am
haqving problems while saving them. I cannot tamper with the format of
the files as they need to be uploaded onto my system.


I hope I have explained the problem. The solution might be simple but I

am not getting it. Moreover I don't want to mess up the data. Therefore

please someone help me.


Hoping to get an early reply.


Thanks & Regards,
Prasad

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
Why will Excel will not save text format in a .csv file davis Excel Worksheet Functions 1 January 25th 06 06:44 PM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 03:26 AM
How can I save a file as a comma-delimited text file in Excel? LAM Excel Discussion (Misc queries) 1 May 3rd 05 11:24 PM
how to save a file as ASCII: expanded comma delimited text (.exp). kmh Excel Discussion (Misc queries) 0 May 1st 05 02:05 AM
How to save an excel spreadsheet as a text file without added quot Dozzle Excel Discussion (Misc queries) 2 April 11th 05 05:21 PM


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