Enter the data in specified Node in XML file with below code.
Code :-
Set Doc = XMLUtil.CreateXML()
Doc.LoadFile "XmlFilePath"
Set root = doc.GetRootElement()
Set children = root.ChildElements()
For i = 1 to datatable.LocalSheet.GetRowCount
datatable.LocalSheet.SetCurrentRow(i)
Set firstChild = doc.GetRootElement().ChildElementsByPath("Node path through Local sheet").Item(1)
firstChild.setValue "Enter Value"
Next
doc.SaveFile "C:\Test_SaveAs.XML"
Thursday, May 27, 2010
Friday, May 7, 2010
Get the Numeric value from a Alpha Numeric String
Get the Numeric value from a string which is containing numeric and string combinations with below code :-
strValue="DNT -1,21,21,123.99 value generated"
ActValue = ""
intStringLength = Len(strValue)
For intPos = 1 TO intStringLength
If IsNumeric(Mid(strValue,intPos,1)) Then
ActValue = ActValue & Mid(strValue,intPos,1)Else
If Mid(strValue,intPos,1) = "." Then
ActValue = ActValue & Mid(strValue,intPos,1) End If
End If
Next
strValue="DNT -1,21,21,123.99 value generated"
ActValue = ""
intStringLength = Len(strValue)
For intPos = 1 TO intStringLength
If IsNumeric(Mid(strValue,intPos,1)) Then
ActValue = ActValue & Mid(strValue,intPos,1)Else
If Mid(strValue,intPos,1) = "." Then
ActValue = ActValue & Mid(strValue,intPos,1) End If
End If
Next
Labels:
General
Wednesday, May 5, 2010
Subscribe to:
Posts (Atom)