For col = 0 To (intCols - 1)
Range(strStrtCell + "1").Offset(i, col).Select
Select Case col
Case 0
Set xmlS_CellElement = xml.createElement("S_Cell")
xmlS_RowElement.appendChild xmlS_CellElement
subxmlAttribute "colname", col + 1, xmlS_CellElement
Set xmlS_CellBodyElement = xml.createElement( _
"S_CellBody")
xmlS_CellElement.appendChild xmlS_CellBodyElement
Set xml_PhysicalSymbolElement = xml.createElement( _
"PhysicalSymbol")
subPhysicalValueElement Mid(Range(strStrtCell + _
"1").Offset(i, col).Value, 1, 1), _
xml_PhysicalSymbolElement
subSubscriptElement Mid(Range(strStrtCell + "1").Offset( _
i, col).Value, 2), xml_PhysicalSymbolElement
xmlS_CellBodyElement.appendChild _
xml_PhysicalSymbolElement
Case Else
Set xmlS_CellElement = xml.createElement("S_Cell")
xmlS_RowElement.appendChild xmlS_CellElement
subxmlAttribute "colname", col + 1, xmlS_CellElement
Set xmlS_CellBodyElement = xml.createElement( _
"S_CellBody")
xmlS_CellElement.appendChild xmlS_CellBodyElement
If Range(strStrtCell + "1").Offset(i, col).Value <> _
"" Then
strNoOfFootnotes = Split(Range(strStrtCell + _
"1").Offset(i, col).Value, ",")
Else
strNoOfFootnotes(0) = "End"
End If
intNo = 0
While (intNo <= UBound(strNoOfFootnotes))
Select Case strNoOfFootnotes(intNo)
Case 1
If col = intCols - 1 Then
If Not blFootnote1 And strLabel <> "FBDIMM" Then
strAddress1 = Range(strStrtCell + _
"1").Offset(i, col).Address
strAddress1 = Replace(strAddress1, "$", _
"JM")
subFootnotes strAddress1, strLabel, _
blRanks, "1", xmlS_CellBodyElement
blFootnote1 = True
ElseIf Not blFootnote1 And strLabel = "FBDIMM" _
Then
strAddress1 = Range(strStrtCell + _
"1").Offset(i, col).Address
strAddress1 = Replace(strAddress1, "$", _
"JM")
subFootnotes strAddress1, strLabel, _
blRanks, "1", xmlS_CellBodyElement
blFootnote1 = True
Else
subCrossRefElement strAddress1, _
"Footnote", xmlS_CellBodyElement
End If
Else
subxmlText Range(strStrtCell + "1").Offset(i, _
col).Value, xmlS_CellBodyElement
End If
Case 2
If col = intCols - 1 Then
If Not blFootnote2 Then
strAddress2 = Range(strStrtCell + _
"2").Offset(i, col).Address
strAddress2 = Replace(strAddress2, "$", _
"JM")
subFootnotes strAddress2, strLabel, _
blRanks, "2", xmlS_CellBodyElement
blFootnote2 = True
ElseIf blRanks Then
subCrossRefElement strAddress2, "Footnote", _
xmlS_CellBodyElement
End If
Else
subxmlText Range(strStrtCell + "1").Offset(i, _
col).Value, xmlS_CellBodyElement
End If
Case 3 |