PC Review


Reply
Thread Tools Rate Thread

Add data at top of text file

 
 
xp
Guest
Posts: n/a
 
      7th Jul 2009
I have a text file (CSV) formatted for upload using an FTP tool; but I need
to add a certain header to the top of the text file, before the contents.
Because this will be done often and the exacting requirements of FTP, I am
coding this procedure using VBA.

Can someone please provide a generic example showing how to open the file
for editing, insert a header, save, and close the text file?

I am familiar with both the "Open for Input/Output" method and also the
"FileSystemObject" methods. I've appended data before, but I'm not sure how
to insert info at the top of the file. Your help would be much appreciated.
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      7th Jul 2009

Think of creating a new file, with first you new header then add the other
file.

--

Regards,
Nigel
(E-Mail Removed)



"xp" <(E-Mail Removed)> wrote in message
news:60591968-9A87-47E0-BBAD-(E-Mail Removed)...
>I have a text file (CSV) formatted for upload using an FTP tool; but I need
> to add a certain header to the top of the text file, before the contents.
> Because this will be done often and the exacting requirements of FTP, I am
> coding this procedure using VBA.
>
> Can someone please provide a generic example showing how to open the file
> for editing, insert a header, save, and close the text file?
>
> I am familiar with both the "Open for Input/Output" method and also the
> "FileSystemObject" methods. I've appended data before, but I'm not sure
> how
> to insert info at the top of the file. Your help would be much
> appreciated.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to separate text and numeric data in the excel or text file. lonkar Microsoft Excel Programming 2 5th May 2009 05:57 AM
importing external data from text file erroneously converts text d Dan K Microsoft Access External Data 0 18th Feb 2009 02:26 PM
Exporting Text with a data to a delimited text file =?Utf-8?B?RCBIYWZlciAtIFRGRQ==?= Microsoft Access External Data 4 5th Sep 2006 06:16 PM
Copy the text data from the column of an excel sheet into a text file . Sharbat Microsoft Excel Misc 2 21st Mar 2004 12:28 PM
importing text file, removing data and outputting new text file Pal Microsoft Excel Programming 8 27th Feb 2004 08:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 PM.