PC Review


Reply
Thread Tools Rate Thread

How do you send data to the same row of a text file everytime?

 
 
Bernard
Guest
Posts: n/a
 
      25th Nov 2009
All,
How do I output to the same position in a Text file everytime? I want to
output data for a given Date so I'd like to put it in the same row for that
Date everytime, and so overwrite the existing data in that row?

I use the following command:
Write #10, dateline, variable1, variable2, variable3
'where dateline is today's date in excel date code.
I drop into the file at the row corresponding to last week's date e.g. row
40010.
Write #10, dateline+1, variable1, variable2, variable3
'where dateline +1 is tomorrow's date in excel date code.
I drop into the file at the row corresponding to today's date e.g. row
40017.

I want to be able to open my text file, overwrite the existing data in that
file for the row corresponding to today's date. Is it possible to write to a
specific row in a text file..... ?
thanking you
Bernard
 
Reply With Quote
 
 
 
 
OssieMac
Guest
Posts: n/a
 
      25th Nov 2009
Hi Bernard,

Someone might be able to answer your question to do this but if not then I
would give consideration to writing it to another Excel workbook with only
one worksheet and then Save the Excel workbook as a text file. The workbook
could become the master and just overwirte the text file each time.

--
Regards,

OssieMac


"Bernard" wrote:

> All,
> How do I output to the same position in a Text file everytime? I want to
> output data for a given Date so I'd like to put it in the same row for that
> Date everytime, and so overwrite the existing data in that row?
>
> I use the following command:
> Write #10, dateline, variable1, variable2, variable3
> 'where dateline is today's date in excel date code.
> I drop into the file at the row corresponding to last week's date e.g. row
> 40010.
> Write #10, dateline+1, variable1, variable2, variable3
> 'where dateline +1 is tomorrow's date in excel date code.
> I drop into the file at the row corresponding to today's date e.g. row
> 40017.
>
> I want to be able to open my text file, overwrite the existing data in that
> file for the row corresponding to today's date. Is it possible to write to a
> specific row in a text file..... ?
> thanking you
> Bernard

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      25th Nov 2009
You'll have to read it and parse the data, check what you want to determine if
you're on the correct row, and then write out the variables (with the new
value).

And I would suppose you'd want to check to see if there's a matching date record
in your file--then add (or whatever you wanted) that new record.

Bernard wrote:
>
> All,
> How do I output to the same position in a Text file everytime? I want to
> output data for a given Date so I'd like to put it in the same row for that
> Date everytime, and so overwrite the existing data in that row?
>
> I use the following command:
> Write #10, dateline, variable1, variable2, variable3
> 'where dateline is today's date in excel date code.
> I drop into the file at the row corresponding to last week's date e.g. row
> 40010.
> Write #10, dateline+1, variable1, variable2, variable3
> 'where dateline +1 is tomorrow's date in excel date code.
> I drop into the file at the row corresponding to today's date e.g. row
> 40017.
>
> I want to be able to open my text file, overwrite the existing data in that
> file for the row corresponding to today's date. Is it possible to write to a
> specific row in a text file..... ?
> thanking you
> Bernard


--

Dave Peterson
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      25th Nov 2009
You have responses to your other posts, too.

Bernard wrote:
>
> All,
> How do I output to the same position in a Text file everytime? I want to
> output data for a given Date so I'd like to put it in the same row for that
> Date everytime, and so overwrite the existing data in that row?
>
> I use the following command:
> Write #10, dateline, variable1, variable2, variable3
> 'where dateline is today's date in excel date code.
> I drop into the file at the row corresponding to last week's date e.g. row
> 40010.
> Write #10, dateline+1, variable1, variable2, variable3
> 'where dateline +1 is tomorrow's date in excel date code.
> I drop into the file at the row corresponding to today's date e.g. row
> 40017.
>
> I want to be able to open my text file, overwrite the existing data in that
> file for the row corresponding to today's date. Is it possible to write to a
> specific row in a text file..... ?
> thanking you
> Bernard


--

Dave Peterson
 
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
won't send e-mails everytime charlie Windows Vista Mail 1 25th May 2008 01:19 AM
How do I set up automatic bcc everytime I send an email? =?Utf-8?B?Q29uZnVzZWQgYWJvdXQgT3V0bG9vaw==?= Microsoft Outlook Discussion 2 12th Oct 2006 12:07 AM
Text shown up in other cells everytime a text is entered in 1 cell =?Utf-8?B?YmlveXl5?= Microsoft Excel Misc 1 26th Aug 2005 05:26 PM
importing text file, removing data and outputting new text file Pal Microsoft Excel Programming 8 27th Feb 2004 08:32 PM
Re: Why Password everytime on Send/Receive ? Mike Microsoft Outlook Discussion 0 17th Dec 2003 11:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 PM.