How to set field values for the table field type in Craft 3
I figured this out. The table field is expecting JSON:

$entry = new Entry();
$entry-&gt;sectionId = 1;
$entry-&gt;typeId = 1;
$entry-&gt;title = $title;
$entry-&gt;setFieldValues([
  "field_handle" =&gt; '[{"col1":"hello","col2":"world"},{"col1":"more","col2":"stuff"}]'
]);