Edit copy to datatable code in 'add data table to slide' PowerPoint activity

I have this code:


In this activity:

The issue is that the data table is too big too fit the slide - is there a way to to edit the code to fit the data table in the slide? I have attempted to reduce the font size however the table was still too big



Check how many rows are fitting maximum…and then split the data across the slides if that is fine


Unfortunately the requirement is to fit it into one slide


Manually are you able to?

if so…then the size is to be maintained as is


Manually I can edit it but I need to automate the editing - is there perhaps another way of accomplishing the fitting of the table

If there is too much data, even with a small font, what are you expecting? How can it fit?

The issue isn’t the text

Had to really zoom out of the PowerPoint slide to show the issue above

The text fits fine but the table does not stop when the text stops at the bottom


May be filter the table or remove the extra rows …that way it decreases


I used this to remove the extra rows:

DataRowTable.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(“”))).CopyToDataTable()

I got this error:

I believe I got the error as my table is a type data row → so don’t think filtering or removing rows will work



If its enumerable of datarow then directly use this

DataRows.Where(function(x) x.All(function(y) IsNothing(y) OrElse String.IsNullOrEmpty(y))).CopyToDataTable