Fix CSV line endings
This commit is contained in:
@@ -170,7 +170,7 @@ Sub ImportMasterDetailData()
|
|||||||
.Close
|
.Close
|
||||||
End With
|
End With
|
||||||
|
|
||||||
lines = Split(textContent, vbCrLf)
|
lines = Split(textContent, vbLf)
|
||||||
|
|
||||||
' === Validate CSV header ===
|
' === Validate CSV header ===
|
||||||
If UBound(lines) >= 0 And Trim(lines(0)) <> "" Then
|
If UBound(lines) >= 0 And Trim(lines(0)) <> "" Then
|
||||||
@@ -388,7 +388,7 @@ Sub ExportMasterDetailData()
|
|||||||
|
|
||||||
' Use constant for header
|
' Use constant for header
|
||||||
Dim csvContent As String
|
Dim csvContent As String
|
||||||
csvContent = CSV_HEADER & vbCrLf
|
csvContent = CSV_HEADER & vbLf
|
||||||
|
|
||||||
' Data: C,G,H,I,J,K,L,M,N,O,P (skip D,E,F)
|
' Data: C,G,H,I,J,K,L,M,N,O,P (skip D,E,F)
|
||||||
Dim r As Long
|
Dim r As Long
|
||||||
@@ -400,7 +400,7 @@ Sub ExportMasterDetailData()
|
|||||||
For j = 7 To 16
|
For j = 7 To 16
|
||||||
csvContent = csvContent & "," & CleanCSVField(ws.Cells(r, j).Value)
|
csvContent = csvContent & "," & CleanCSVField(ws.Cells(r, j).Value)
|
||||||
Next j
|
Next j
|
||||||
csvContent = csvContent & vbCrLf
|
csvContent = csvContent & vbLf
|
||||||
End If
|
End If
|
||||||
Next r
|
Next r
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user