I use the kartik export widget (ExportMenu) and I want to change the style in the excel sheet. I want a table without border. I have tried this:
$style = [
'borders' => [
'outline' => [
'borderStyle' => Border::BORDER_NONE,
],
'inside' => [
'borderStyle' => Border::BORDER_NONE,
]
],
];
$exportMenu = ExportMenu::widget([
'dataProvider' => $dataProvider,
'columns' => $gridColumns,
'exportConfig' => [
ExportMenu::FORMAT_TEXT => false,
ExportMenu::FORMAT_HTML => false,
ExportMenu::FORMAT_PDF => false,
ExportMenu::FORMAT_CSV => false,
ExportMenu::FORMAT_EXCEL => false,
ExportMenu::FORMAT_EXCEL_X => $style,
],
]);
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => $gridColumns,
'panel' => [
'type' => GridView::TYPE_PRIMARY,
'heading' => '',
],
'exportContainer' => [
'class' => 'btn-group mr-2'
],
'toolbar' => [
$exportMenu,
'options' => ['class' => 'btn-group']
],
]);
I have read the documentation (http://demos.krajee.com/export) and actually it should work in this way. But nothing changes. Please help!