Hi guys, i've faced the problem while exporting pivot table with so many columns into excel document.
here is my export.php code:
<?php
require_once "ppg.php";
$report = new ppg;
if ($_POST['laporan'] == "1") {
$report->run()->exportToExcel(array(
"dataStores"=>array(
'status_ajuan'=>array(
'rowDimension'=>'row',
'columnDimension'=>'column',
'measures'=>array(
'jml - sum',
),
'headerMap'=>array(
'jml - sum'=>'Propinsi - Kota',
),
'totalName'=>'Grand Total',
)
)
))->toBrowser('Laporan PPG Berdasarkan Status Ajuan.xls');
}
else if ($_POST['laporan'] == "2") {
$report->run()->exportToExcel(array(
"dataStores"=>array(
'status_aktivasi'=>array(
'rowDimension'=>'row',
'columnDimension'=>'column',
'measures'=>array(
'jml - sum',
),
'headerMap'=>array(
'jml - sum'=>'Propinsi - Kota',
),
'totalName'=>'Grand Total',
)
)
))->toBrowser('Laporan PPG Berdasarkan Status Aktivasi.xls');
}
else {
$report->run()->exportToExcel(array(
"dataStores"=>array(
'prodi'=>array(
'rowDimension'=>'row',
'columnDimension'=>'column',
'measures'=>array(
'jml - sum',
),
'headerMap'=>array(
'jml - sum'=>'Propinsi - Kota',
),
'totalName'=>'Grand Total',
)
)
))->toBrowser('Laporan PPG Berdasarkan Program Studi.xls');
}
for first and 2nd report, there is no problem:
but not for 3rd report, here is the error message while i open these document on excel:
all of data was lost