Rpeat table values copied into clipboard need to format now, help! - InfoPath Dev
in

InfoPath Dev

Rpeat table values copied into clipboard need to format now, help!

Last post 03-04-2012 05:51 PM by kerberos. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-04-2012 05:51 PM

    Rpeat table values copied into clipboard need to format now, help!

    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).ToString

    Dim 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.Current

    Dim 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 Try

    End 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,

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.