Convert List of String Variable to DataTable

I have 2 Excel Sheets which I create Datatable and I sum them individually and write the sum at the end of the last column dyanamically using List of String Variable.

Now that list variable hold data like
List(9) { “0”, “0”, “0”, “60626.4094299998”, “8776.42535000011”, “0”, “52849.6766199999”, “-108272.198”, “401830.16” }

List(9) { “0”, “0”, “0”, “60626.4094299998”, “8776.42535000011”, “0”, “52849.6766199999”, “-108272.198”, “401830.16” }

I need to achieve 2 things.

  1. Create DataTable of the values that I am holding in List Variable and write back to new excel sheet. Not worried about the Column Header as I copy them before from other sheet.
  2. Subtract 1st List with 2nd list and find the variance.

Please refer the image below for the output.


Hope the following sample helps you.

Sequence7.xaml (10.1 KB)


@Yoichi - thanks for your reply.
But not able to open your attachment, please see the attachment.

I have managed to limit to double digit.


Can you try to open the following project? (2.8 KB)


Hi @Yoichi thanks for your reply and sorry for late reply.
Too busy with work hence not able even to see replies.

You solution is working, but I am not able to get what kind of variable is the arrList

can you please give me full path of it, System.Collections.Generic.List

Thanks for the solution, it is what I am looking for. Just that not able to assign the arrList variable type that you have.

If I enter System.Collections.Generic.List<System.String> it returns nothing


Can you try the following steps?



1 Like

@Yoichi thank you very much my friend for all your help.
it worked.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.