my company has asked me to create a continously updating excel document. we use a program that creates a log file in a csv format that is updated about every 3 to 5 minutes. As you can guess this makes for a very large file in a very short time. what they want is to be able to access the data in the log via excel. they also want the data to be imported into an access database every night and have the log file reset so that its size doesnt get to large, and to have this archived data available to. but they want the current days data as close to real time as possible. is their a way to create a single document that can be accessed by everyone to show this data in realtime in excel or access?
You can read from a CSV or text file within Excel VBA code by using the FileSystemObject to read from the file line by line and then do what you like with the data read in Excel. e.g.
VBA Code:
Dim fso As New FileSystemObject Dim fld As Folder Dim ts As TextStream Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set ts = fso.OpenTextFile("C:\Temp\temp.txt", ForReading)
While Not ts.AtEndOfStream Debug.Print ts.ReadLine Wend