View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Open CSV file, format data and write output to a text file.

http://www.cpearson.com/excel/imptext.htm import/export text files

at Chip Pearson's site should get you started.

Some References:
http://web.archive.org/web/200404050...eio/fileio.asp
File Access with Visual Basic® for Applications

http://support.microsoft.com/default...b;en-us;151262
Working with Sequential Access Files

http://www.applecore99.com/gen/gen029.asp

--
Regards,
Tom Ogilvy


"BristolBloos" wrote in message
oups.com...
Hi All,

Through my Excel VBA i want to
1. Open a csv file
2. Read each row
3. Select few fields
4. Format them
5. Concatenate them as a single text separated by "#"

and

6. Finally write the output into a text file


I know the name and location of the input csv file and therefore I
don't want the user to open it manually. Rather the file should be
opened automatically using VBA code for reading.


Some suggestions and code examples please.

Thanks & Regards,
Prasad