E.T.S
September 20, 2023, 3:03pm
22
@supermanPunch ,
That’s right - that is why I am trying to find an alternative way of inputting the data so that the table can fit into the slide
Is there a way of getting the row index of the data row obtained? That way I can read range of that data table and put it into the ‘add data table to slide’ activity
E.T.S
September 20, 2023, 3:03pm
23
@postwick
I’m not using a for each so this won’t work
I’ve tried this:
But got this error:
The dtTableNew is a variable of type data table I have made
postwick
(Paul)
September 20, 2023, 3:59pm
24
In the variables panel, set the Default for dtTableNew to New System.Data.Datatable
You have to initialize it before you can add to it.
postwick
(Paul)
September 20, 2023, 4:09pm
26
don’t put drCorrespondingRow into the DataRow property. Put drCorrespondingRow.ItemArray into the ArrayRow property.
postwick
(Paul)
September 20, 2023, 4:13pm
28
The error message is pretty clear. You need to use Build Data Table to set up the columns in dtTableNew
E.T.S
September 20, 2023, 4:20pm
29
The data still doesn’t fit into the slide - the table is way to big
When I am using the build data table activity then using the add data row activity → I think the bot doesn’t know which columns to put the data in:
Is there a way of getting the index of the data row then reading range for that which will give me a data table → then can input this into the add to slide activity
postwick
(Paul)
September 20, 2023, 5:12pm
30
None of that is going to have any effect on what ends up in the slide. A datatable is just data, there’s no formatting nor size to it.
Have you done this?
@E.T.S ,
Could you try in the below way :
Keep a Placeholder Table in your PPT file. Prepare this table format as required. Like below :
[image]
Next, we can use the Add Datatable to Slide activity and overwrite the existing data present. This should preserve the format as maintained as Template.
[image]
Input Data :
[image]
Output :
[image]
It keeps the table format as maintained earlier unless your data exceeds the length of the column capacity maintained.
E.T.S
September 20, 2023, 5:38pm
31
I cannot use that method as it uses a data table as an input whereas I have a data row variable
Is there a way of adapting that method to accommodate for a data row variable?
postwick
(Paul)
September 20, 2023, 7:13pm
32
ItemArray is a property of datarow, not datatable.
E.T.S
September 21, 2023, 9:08am
33
This worked! When I was writing the data row into Excel I misread it and thought the row was split between multiple columns but it wasn’t!
Thank you!
1 Like
system
(system)
Closed
September 24, 2023, 9:09am
34
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.