Remove duplicate ReadCSVFile functions

This commit is contained in:
updsv7
2026-04-13 19:04:22 +09:00
parent 35bdc1479b
commit ac1d6deb87

View File

@@ -76,27 +76,6 @@ Function SelectCSVFile() As String
End With
End Function
Function ReadCSVFile(ByVal filePath As String) As Variant
If filePath = "" Then
ReadCSVFile = Array()
Exit Function
End If
Dim stream As Object
Dim textContent As String
Set stream = CreateObject("ADODB.Stream")
With stream
.Type = 2
.Charset = "shift_jis"
.Open
.LoadFromFile filePath
textContent = .ReadText
.Close
End With
ReadCSVFile = Split(textContent, vbLf)
End Function
Function GetSaveCSVPath(Optional ByVal defaultName As String = "") As String
Dim savePath As String
@@ -130,27 +109,6 @@ Sub WriteCSVFile(ByVal filePath As String, ByVal content As String)
End With
End Sub
Function ReadCSVFileWithUtf8(ByVal filePath As String) As Variant
If filePath = "" Then
ReadCSVFileWithUtf8 = Array()
Exit Function
End If
Dim stream As Object
Dim textContent As String
Set stream = CreateObject("ADODB.Stream")
With stream
.Type = 2
.Charset = "utf-8"
.Open
.LoadFromFile filePath
textContent = .ReadText
.Close
End With
ReadCSVFileWithUtf8 = Split(textContent, vbLf)
End Function
Function ReadCSVFile(ByVal filePath As String, Optional ByVal charset As String = "shift_jis") As Variant
If filePath = "" Then