- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
i = 2
X = "blank"
index = ""
qty = "1"
For Each Z In sContents
If (Z.StartsWith("1") Or Z.StartsWith("2") Or Z.StartsWith("3") Or Z.StartsWith("4") Or Z.StartsWith("5") Or Z.StartsWith("6") Or Z.StartsWith("7") Or Z.StartsWith("8") Or Z.StartsWith("9")) Then
Line = Z.Split("|")
If Not Line(0).Contains(".") Then
index = Line(0)
qty = 1
End If
If Line(1).StartsWith("ID") Then
X = Line(3).Substring(15)
qty = Line(4)
Else
sheet.Cells(i, 1) = Line(2)
sheet.Cells(i, 2) = Line(3)
If Line(2) = X Then
sheet.Range("B" & i).Font.Bold = True
Else
If Line(0).StartsWith(index & ".") Then
sheet.Range("B" & i).IndentLevel() = 1
End If
End If
If Not Line(0).Contains(".") Then
sheet.Range("B" & i).Font.Bold = True
End If
If Line(5) = "N/A" Then
sheet.Cells(i, 3) = 0
Else
sheet.Cells(i, 3) = Line(5)
End If
sheet.Range("C" & i).NumberFormat = "[$$-2409]#,##0.00"
sheet.Cells(i, 4) = Line(7)
If qty > 1 Then
sheet.Cells(i, 5) = Line(4) * qty
Else
sheet.Cells(i, 5) = Line(4)
End If
sheet.Cells(i, 6) = "=E" & i & "*C" & i
sheet.Range("F" & i).NumberFormat = "[$$-2409]#,##0.00"
sheet.Range("D" & i, "E" & i).HorizontalAlignment = Excel.Constants.xlCenter
sheet.Range("A" & i, "F" & i).Font.Size = 10
sheet.Range("A" & i, "F" & i).Borders.LineStyle = Excel.Constants.xlSolid
i = i + 1
End If
End If
Next Z