hemant_6
(hemant)
August 23, 2019, 4:39pm
1
Hi everyone,
Can you please help me, how to write a list in a column of excel sheet.
Explanation: I have two lists containing more than 500 elements, I want to write those 2 lists in column 1 and column 2 of excel sheet
Thanks
these lists contain strings
1 Like
chenderson
(Cary Henderson)
August 23, 2019, 4:54pm
2
Good morning Hemant,
You should be able to write your list using the “Write Range” activity for Excel.
You can specify which cell each list is written to (A1, B1), which will enable you to write both ranges next to each other in the workbook.
hemant_6
(hemant)
August 23, 2019, 4:58pm
3
there is an error of conversion, the list contains string, should I be using any conversion formatters?
chenderson
(Cary Henderson)
August 23, 2019, 5:17pm
4
Do you have an array of strings or is your list of values in a datatable?
hemant_6
(hemant)
August 23, 2019, 5:20pm
5
[Untitled]
Hi, @everyone
I am using Pythonscope in getting a desired list, this list I have to write it in a excel file, may I know how can I convert the list of strings into datatable variables?
There is an error in conversion, how do I convert list into datatable, should I use assign activity or what is the process to covert ?
Thanks
this is the issue, can you suggest me what to do with this
chenderson
(Cary Henderson)
August 23, 2019, 5:52pm
6
Try the following steps hemant:
Build Datatable
For Each (loop through the strings in your array)
Add Row to DataTable (this will use the values from your array and add them to the datatable in step 1)
Even for a large number of records, this will process very quickly.
Fer
November 7, 2019, 10:36am
7
Hi @chenderson ,
Based on the below image, I would like to create a list of strings based on those 3 columns. Can you help?
I was reading the excel Range, then for each row, I was using the invoke method. However my TargetObject (holidaysList) is of type Systems.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<System.String>>>
sarathi125
(Parthasarathi)
November 7, 2019, 10:48am
8
@Fer ,
May I know why you need a List(Of String). If you need three different list then you need to do individual column conversion into List(Of String).
But as you mentioned Nested List can be done, but the current data you shown is not the right candidate for that.
Fer
November 7, 2019, 10:59am
9
Hi @sarathi125 , actually I am not so used to Lists.
But what I would like to have only one List with 3 columns. For example,
List(0)(0) = Tuesday
List(0)(1) = January
List(0)(2) = 01/01/2019
List(2)(0) = Friday
List(2)(1) = April
List(2)(2) = 04/19/2019
sarathi125
(Parthasarathi)
November 7, 2019, 11:10am
10
@Fer ,
Then you can store a string array inside a List, and then you can use it.
1 Like