Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-06-20 09:07 PM
Hi,
I have 16 columns but I want the last column to be between columns 6 and 7 for example, I already tried this by changing the code of the 'Merge Collection' how do I put it exactly where I want it?
------------------------------
Massallys Silva
------------------------------
I have 16 columns but I want the last column to be between columns 6 and 7 for example, I already tried this by changing the code of the 'Merge Collection' how do I put it exactly where I want it?
------------------------------
Massallys Silva
------------------------------
Answered! Go to Answer.
1 BEST ANSWER
Helpful Answers
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 01:18 PM
Glad that you were able to get it.
I edited the comment above to make it clear.
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
I edited the comment above to make it clear.
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 04:43 AM
Try this
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
c1.Columns(colName).SetOrdinal(colIndex) c3 = c1Edit: (for better understanding) 3 inputs c1=collection, colName=str, colIndex=Index output c3=collection and above 2 lines of code in code stage.
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 12:50 PM
It will be like this right?
------------------------------
Massallys Silva
------------------------------
For Each c As DataColumn in c2.Columns
c1.Columns.Add(CloneColumn(c))
Next
c1.Columns.Add(CloneColumn(c))
Next
For r As Integer = 0 To c1.Rows.Count + 1
If r < c2.Rows.Count Then
For Each c As DataColumn in c2.Columns
c1.Rows(r)(c.ColumnName) = c2.Rows(r)(c.ColumnName)
Next
Else
Exit For
End If
Next
c1.Columns(colName).SetOrdinal(colIndex)
c3 = c1
If r < c2.Rows.Count Then
For Each c As DataColumn in c2.Columns
c1.Rows(r)(c.ColumnName) = c2.Rows(r)(c.ColumnName)
Next
Else
Exit For
End If
Next
c1.Columns(colName).SetOrdinal(colIndex)
c3 = c1
------------------------------
Massallys Silva
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 12:54 PM
------------------------------
Massallys Silva
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 01:06 PM
This code does work it thank you
------------------------------
Massallys Silva
------------------------------
------------------------------
Massallys Silva
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 01:18 PM
Glad that you were able to get it.
I edited the comment above to make it clear.
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
I edited the comment above to make it clear.
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-06-20 02:15 PM
Yes, I saw. Thank you very much. You helped a lot!
------------------------------
Massallys Silva
------------------------------
------------------------------
Massallys Silva
------------------------------
