We have used yii2 krajee export for exporting grid data.
How can we modify default title, description , lastmodifiedby?
echo ExportMenu::widget([
'dataProvider' => $dataProvider,
'columns' => $gridColumns,
'target' => ExportMenu::TARGET_SELF,
'exportConfig' => [
ExportMenu::FORMAT_PDF => false,
],
'filename' => 'export-list_' . date('Y-m-d_H-i-s'),
]);
Try This : Here is a example of CSV. You can do like wise for others also.
What I did to get my task done-
I have in my header as-
Then in gridView -
That worked for me. just make changes in
'exportConfig'
section for rename file.