This is the dataset.table(0)
I want to write it in this format in Excel

Thanks!
Hi @Sami_Rajput
Try using dataset.table(1)
looks like you want to transform a DataTable with 1 row into a Key, Value Structure
Build DataTable Activity: - dtKVData
Assign Activity
dtKVData =
(From d in dataset.table(0).AsEnumerable
From c in dataset.table(0).Columns.Cast(Of DataColumn)
let ra = new Object(){c.ColumnName, d(c.ColumnName)}
Select r = dtKVData.Rows.Add(ra)).CopyToDataTable
sorry had a typo. just refer to the fixed LINQ
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.