Hello all,
I got the values of a repeating table into a variable and I created a button that stores that into the clipboard to be pasted on another application later.
I now have to format the string I copied on the proper format of this target application / table.
My trouble is on having these vertical lines horizontally formated separated by TABS (different tabulation for each value)
Public Sub CTRL178_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
Dim copyString As String = ""Dim wbscode As XPathNavigator = MainDataSource.CreateNavigator()
Dim wbs As String = wbscode.SelectSingleNode("/my:myFields/my:Time_sheet/my:Orders/my:WBS", NamespaceManager).ToStringDim days As XPathNavigator = MainDataSource.CreateNavigator()
Dim nodes As XPathNodeIterator = days.Select("/my:myFields/my:Time_sheet/my:Orders/my:Days", NamespaceManager)While nodes.MoveNext()
Dim nodesNav As XPathNavigator = nodes.CurrentDim nodesText As XPathNodeIterator = nodesNav.SelectDescendants(XPathNodeType.Text, False)
While nodesText.MoveNext()
Dim str As String = nodesText.Current.Value
copyString = copyString + str
End While
End While
Try
Clipboard.SetText(copyString)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End TryEnd Sub
End Class
With the above code I have the following result on the clipboard:
1
2
3
4
5
6
7
I wish to have:
1 2 3 4 5 6 7
Any ideas how to format this str value??
Thanks,