Hi to forum,
I have a problem o doubt with BigSpreadsheetExportable, in the example I can specify the colums that I want to export, but the example parameter is a unidimensional array with index of columns:
from the documentation: https://www.koolreport.com/docs/excel/export_to_big_spreadsheet/
<?php
$report = new MyReport;
$report->run()->exportToXLSX(array(
"dataStores" => array(
'salesReport' => array(
"columns"=>array(
0, 1, 2, 'column3', 'column4' //if not specifying, all columns are exported
)
)
)
))->toBrowser("myreport.xlsx");
But I need to give the option to specify the label and type of the columns because in datetime and decimal number are detecting as string and is not correct type.
I try with this like view but make a loop at export.
if ($type === 'XLSX') {
$report->run()->exportToXLSX(
array(
"dataStores" => array(
'connectivity_test_results' => array(
"columns"=>array(
"fecha_ejecucion"=>array(
"type"=>"timestamp",
"label"=>"Fecha"
),
"codigo_operador"=>array(
"label"=>"Código Operador"
),
)
),
),
)
)
->toBrowser("ReportName.xlsx");
How i can make this ?
thanks in advance.