Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel crashes everytime I send focus from control to worksheet | Excel Programming | |||
Send worksheet to text file | Excel Programming | |||
Possible to write VBA code to send out an EMAIL everytime a workbook is opened? | Excel Programming | |||
send contents of cell b4 to a plain text file | Excel Programming | |||
How do I send some cells to an external text file? | Excel Programming |