How to do integration of Kartik-v Export widget in yii2 basic to export table data?
<p>I am a newbie to yii2 and learning it. I am trying to integrate the export widget developed by kartik. I have installed it using composer. But when I am trying to use it in my project, I am not able to export any data. It just shows two buttons one is for list of columns and second is for export as excel, pdf,csv. when I am clicking on export as csv nothing is happening. I have spend around 4-5 hours to integrate it but nothing is in my favor. can anyone provide the best tutorial or any suggestion how to integrate it in my project.</p>

<p>Link of the widget is -: <a href="https://github.com/kartik-v/yii2-export" rel="nofollow noreferrer">https://github.com/kartik-v/yii2-export</a></p>

<pre><code>  &lt;?php

    use yii\helpers\Html;
    use yii\grid\GridView;
    use yii\bootstrap\ActiveForm;
    //use kartik\grid\GridView;
     use kartik\export\ExportMenu;

      /* @var $this yii\web\View */
      /* @var $searchModel app\models\CattleDataSearch */
      /* @var $dataProvider yii\data\ActiveDataProvider */

      $this-&gt;title = 'Cattle Profile';
      $this-&gt;params['breadcrumbs'][] = $this-&gt;title;
       $gridColumns = [
       ['class' =&gt; 'yii\grid\SerialColumn'],
         'cattleform_id',
         'farmer_id',
         'cattle_owner',
         'cattle_id',
         'type_of_cattle',
         'origin',
       ['class' =&gt; 'yii\grid\ActionColumn'],
       ]; 
        echo ExportMenu::widget([
        'dataProvider' =&gt; $dataProvider,
         'columns' =&gt; $gridColumns,
        'columnSelectorOptions'=&gt;[
        'label' =&gt; 'Columns',
        'class' =&gt; 'btn btn-danger'
    ],
    'fontAwesome' =&gt; true,
    'dropdownOptions' =&gt; [
        'label' =&gt; 'Export All',
        'class' =&gt; 'btn btn-success'
    ]
]);

  echo GridView::widget([
'dataProvider' =&gt; $dataProvider,
'filterModel' =&gt; $searchModel,
'columns' =&gt; $gridColumns,
  ]);

  ?&gt;
 &lt;div class="cattle-data-index"&gt;

&lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;/h1&gt;
&lt;?php // echo $this-&gt;render('_search', ['model' =&gt; $searchModel]); ?&gt;
&lt;hr style="background: #C0C0C0; height: 2px;"/&gt;

 &lt;/div&gt;

 &lt;div class="cattle-form-index" style="border: #FFFFFF solid 1px;       border-radius: 10px; padding: 20px; box-shadow: 0px 0px 20px #888888; margin-bottom: 20px; background-color: white; "&gt;

     &lt;?php $form = ActiveForm::begin([
    'action' =&gt; ['index'],
    'method' =&gt; 'get',
]); ?&gt;
    &lt;div class="row"&gt;
        &lt;div class="col-lg-6"&gt;
     &lt;?= $form-&gt;field($model, 'cattleform_id') ?&gt;

       &lt;?= $form-&gt;field($model, 'cattle_id') ?&gt;

     &lt;?= $form-&gt;field($model,'type_of_cattle')-    &gt;dropDownList(array('Cow'=&gt;'Cow','Buffalo'=&gt;'Buffalo'),  ['prompt'=&gt;'Select....']) ?&gt; 
    &lt;/div&gt;
   &lt;div class="col-lg-6"&gt;

 &lt;?= $form-&gt;field($model,'origin')-&gt;dropDownList(array('Gifted'=&gt;'Gifted','Home'=&gt;'Home','Same Village'=&gt;'Same Village','Outside'=&gt;'Outside','Other'=&gt;'Other'),['prompt'=&gt;'Select....']) ?&gt;

&lt;?= $form-&gt;field($model,'natural_of_ai')-&gt;dropDownList(array('Natural'=&gt;'Natural','AI'=&gt;'AI','No Information'=&gt;'No Information','NA'=&gt;'NA','Other'=&gt;'Other'),['prompt'=&gt;'Select....']) ?&gt;

&lt;?= $form-&gt;field($model,'delivery')-&gt;dropDownList(array('Home'=&gt;'Home','Outside'=&gt;'Outside','No Information'=&gt;'No Information','NA'=&gt;'NA'),['prompt'=&gt;'Select....']) ?&gt; 





     &lt;div class="form-group"&gt;
    &lt;?= Html::submitButton('Search', ['class' =&gt; 'btn btn-primary']) ?&gt;
    &lt;?= Html::resetButton('Reset', ['class' =&gt; 'btn btn-default']) ?&gt;

        &lt;?php
       if(isset    ($_GET['farmer_id']))
      {
        echo Html::a('AddNew',    ['create','farmer_id'=&gt;$_GET['farmer_id']], ['class' =&gt; 'btn btn-success']);
    }
    else
    {
        echo Html::a('AddNew', ['create'], ['class' =&gt; 'btn btn-success']);

    }



     ?&gt;

&lt;/div&gt;

&lt;?php ActiveForm::end(); ?&gt;

      &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
 &lt;/div&gt;




&lt;/div&gt;
</code></pre>

<p>On fresh yii installation I am getting the following error-:<a href="https://i.stack.imgur.com/AKe0a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AKe0a.png" alt="enter image description here"></a></p>