Microsoft 365 and Office | Excel | For business | Windows
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dim Table1 As New DataTable
Table1.Columns.Add("C1")
Table1.Columns.Add("C2")
Table1.Columns.Add("C3")
Table1.Rows.Add({1, "A","C"})
Table1.Rows.Add({2, "B","D"})
Table1.Rows.Add({3, "C","D"})
Dim Table2 As New DataTable
Dim sttSeparator as String="<>" 'Use between columns
'Need Result
Table2.Columns.Add("AllColumnsTable1") 'As String
Table2.Rows.Add("1<>A<>C")
Table2.Rows.Add("2<>B<>D")
Table2.Rows.Add("3<>C<>D")
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
An object-oriented programming language developed by Microsoft that can be used in .NET.
Answer accepted by question author
For example:
Table1.AsEnumerable.
Select(Function(r) String.Join(strSeparator, r.ItemArray.Select(Function(i) i.ToString))).
ToList.ForEach(Sub(r) Table2.Rows.Add(r))