Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
' define csv files that will be read
Dim arrCSVFiles : arrCSVFiles = Array("c:\temp\csv_file1.csv", _
"c:\temp\csv_file2.csv", _
"c:\temp\csv_file3.csv")
' define combined csv file
Dim outCSVFile : outCSVFile = "c:\temp\combined.csv"
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
' open output csv file
Dim objOutFile : Set objOutFile = objFSO.OpenTextFile(outCSVFile, ForWriting, True)
Dim csvFile, objFile, strTemp
' loop through the list of csv files to read
For Each csvFile In arrCSVFiles
' open file for reading
Set objFile = objFSO.OpenTextFile(csvFile, ForReading)
Do Until objFile.AtEndOfStream
strTemp = objFile.ReadLine
If Not strTemp = "" Then
' write line to combined csv file
objOutFile.WriteLine strTemp
End If
Loop
' close current opened csv file
objFile.Close
Next
' close combined csv file
objOutFile.Close