Fix import column mapping and error column
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Sub ClearRowData(ByVal ws As Worksheet, ByVal rowNum As Long)
|
||||
' Clear from D column onwards
|
||||
ws.Range(ws.Cells(rowNum, 4), ws.Cells(rowNum, 15)).ClearContents
|
||||
ws.Cells(rowNum, 19).ClearContents ' Q column error info
|
||||
ws.Cells(rowNum, 2).ClearContents ' Q column error info
|
||||
End Sub
|
||||
|
||||
Sub ImportMasterDetailData()
|
||||
@@ -103,9 +103,14 @@ NextCsvLine:
|
||||
|
||||
dataArray = Split(lines(i), ",")
|
||||
|
||||
' CSV col 1 -> C column
|
||||
code = CleanCSVField(CStr(dataArray(0)))
|
||||
wsTarget.Cells(writeRow, 3).Value = code
|
||||
' CSV col1-7 -> C-I column (3-9)
|
||||
wsTarget.Cells(writeRow, 3).Value = CleanCSVField(CStr(dataArray(0)))
|
||||
wsTarget.Cells(writeRow, 4).Value = CleanCSVField(CStr(dataArray(1)))
|
||||
wsTarget.Cells(writeRow, 5).Value = CleanCSVField(CStr(dataArray(2)))
|
||||
wsTarget.Cells(writeRow, 6).Value = CleanCSVField(CStr(dataArray(3)))
|
||||
wsTarget.Cells(writeRow, 7).Value = CleanCSVField(CStr(dataArray(4)))
|
||||
wsTarget.Cells(writeRow, 8).Value = CleanCSVField(CStr(dataArray(5)))
|
||||
wsTarget.Cells(writeRow, 9).Value = CleanCSVField(CStr(dataArray(6)))
|
||||
|
||||
writeRow = writeRow + 1
|
||||
NextLine:
|
||||
|
||||
Reference in New Issue
Block a user