How to write a datatable column into a row in excel


#1

hi everyone i am trying to write data from data table there is only one column in data table and i want to write that into excel in row format data should be put into excel like
price1 price2 price3
81.35 52.15 54.85 …and so on !!
currently all the data gets written into one single column in excel as it is in data table


#2

@Nara

Please find the attached xaml file.

Transpose.xaml (17.6 KB)

Hope it helps… :slight_smile:

Regards
Madhura


How to save the extracted data from the PDF in to excel in a ROW wise?
How to exchange excel data columns to rows with out using data table (i.e Transpose)?
#3

Thanx @Madhuraj it was helpfull.
but what if i have the same data table in string format ex the numbers in the datatable have 81.35% 52.15% ,it is giving error when reaching invoke function giving Format exception! where should i change in the workflow to remove that percentage sign and do the same thing as done above(Transpose)??


#4

I have used Int32 Data Type for List. You can use any type as per your requirement.


#5

Hi @Madhuraj i used string while building data table and also inside add data coloumn activity but it gives error in invoke activity below is the edited version of the file you gave.
Regards

Transpose.xaml (20.8 KB)


#6

hi @Madhuraj thanx for your suggestion i edited the work flow so that it could work with string it works now for string also.
thanx
Regards
Transpose.xaml (17.2 KB)


#7

Hi I liked your solution and it works perfectly.However this example is for one column only.What if i have multiple columns to be converted into rows?I can no longer hardcode row(0).toString.