これを試しましたか?
$tmpl = array ( 'table_open' =>
'<table border="1" cellpadding="2" cellspacing="1" id="YOUR_ID" class="mytable">' );
$this->table->set_template($tmpl);
echo $this->table->generate();
更新 1:
$tmpl = array (
'table_open' => '<table border="1" cellpadding="2" cellspacing="1" id="YOUR_ID" class="mytable">',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
$this->table->set_template($tmpl);
参照: https://ellislab.com/codeigniter/user-guide/libraries/table.html