Different xlFormat and format

Dear All,

I am using kartik’s extension for gridview and datecontrol.

The problem is that I set the datecontrol to have "." (dot) as thousand separator, but when exported to excel, I need to use "," (comma) as thousand separator or no thousand separator.

How to achieve this?

I tried like below but not working, amount is always treated as text and "." is displayed as thousand separator. The other thing, it is work perfectly for date but not for amount.




[

        'class' => '\kartik\grid\DataColumn',

        'attribute' => 'date',

        'format' => ['date', 'php:d-m-Y'],

        'xlFormat' => ['date', 'php:m/d/Y'],

        'filterType' => kartik\grid\GridView::FILTER_DATE_RANGE,

        'filterWidgetOptions' => [

            'hideInput' => true,

            'presetDropdown' => true,

            'convertFormat' => true,

            'pluginOptions' => [

                'locale' => [

                    'format' => 'Y-m-d',

                    'separator' => ' to ',

                ],

                'showDropdowns' => true,

            ],

        ],

        'hAlign' => 'center',

        'width' => '260px;',

    ],

    [

        'class' => '\kartik\grid\DataColumn',

        'attribute' => 'amount',

        'format' => ['decimal', 0],

        'xlFormat' => "\#\,\#\#0",

        'hAlign' => 'right',

        'width' => '100px;',

    ],



Any ideas?

TIA

Daniel