Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I overwrite the last line data in text or csv file from VB
Hello,
Is there a method that I can overwrite the last line of csv/text file WITHOUT reading the whole file from the first line from Excel VBA ? I am trying to read the last line of data and use if function to determine if it would be overwritten. Besides reading the whole file in and rewriting all of them out, is there another efficient way to handle it? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I overwrite the last line data in text or csv file from VB
You can read the whole file but only remember the last line so you're not
using up lots of memory. This only remembers the last record read... Do While Not EOF(iFileNum) Input #iFileNum, strEachRecord strLastLine = strEachRecord Loop -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "Jennifer" wrote: Hello, Is there a method that I can overwrite the last line of csv/text file WITHOUT reading the whole file from the first line from Excel VBA ? I am trying to read the last line of data and use if function to determine if it would be overwritten. Besides reading the whole file in and rewriting all of them out, is there another efficient way to handle it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to overwrite data in file? | Excel Programming | |||
Parsing Data String from text file line | Excel Programming | |||
Reading a text file line by line | Excel Programming | |||
Reading a text file line by line | Excel Programming | |||
import huge text file line-by-line? | Excel Programming |