divide common module into write and read

This commit is contained in:
updsv7
2026-04-14 15:52:33 +09:00
parent b87618dcf3
commit 13d23281b7
3 changed files with 187 additions and 202 deletions

View File

@@ -1,3 +1,22 @@
Function GetSaveCSVPath(Optional ByVal defaultName As String = "") As String
Dim savePath As String
savePath = Application.GetSaveAsFilename( _
FileFilter:="CSV Files (*.csv), *.csv", _
Title:="Save CSV", _
InitialFileName:=defaultName)
If savePath = "False" Or savePath = "" Then
GetSaveCSVPath = ""
Exit Function
End If
If InStr(1, savePath, ".csv", vbTextCompare) = 0 Then
savePath = savePath & ".csv"
End If
GetSaveCSVPath = savePath
End Function
' Writes a 2D array to a CSV file
Sub WriteCSVFromArray( _
ByVal filePath As String, _