‎05-03-2023 03:51 AM
i Want to create a 2D Table report with a python list.
i want to put the list name, num_Fail, num_passed in a 2D table with 3 columns.
is the any expression to call it in the table. 😊
‎05-03-2023 10:54 AM - edited ‎05-03-2023 10:56 AM
I usually create a channel and refer to it in the table but I like your idea too. You can populate your list into a table in a dynamic manner:
a_list = list(range(10))
table = dd.Report.Sheets("Sheet 1").Objects("2DTable1")
for item in range(1, len(a_list)+1, 1):
table.Columns.Item(1).TextList.Item(item).Text = str(a_list[item-1])
Assuming your table is sized and set properly. You can also set table properties in script.