私は一日中テキストファイルにデータを追加してから、いつ、どこかで、あるいは終わりに、あるいは必要に応じて、いくつかの分析を行います。
'Starting the program and sub procedure to write VBA code to write the data to a text file Append.
Sub VBA_to_append_existing_text_file()
'Declaring the strFile_Path variable as String Data Type to store the text file path.
Dim strFile_Path As String
'Assigning the Existing File path to the variable strFile_Path.
strFile_Path = "C:\your_path_here\test.txt"
'Opening the text file for Append with FileNumber as 1.
Open strFile_Path For Append As #1
'Writing to the sample text to the File using FileNumber and Write Command.
YourValue = Worksheets("Sheet1").Range("A1").Value
Write #1, YourValue
'Closing the File using FileNumber.
Close #1
End Sub
2分ごとにマクロを実行します。
Sub my_Procedure()
MsgBox "hello world"
Call test ' for starting timer again
End Sub
Sub test()
Application.OnTime Now + TimeValue("00:02:00"), "my_Procedure"
End Sub
アナリティクスにはExcelまたはRを使用できます。