コード例 #1
0
ファイル: export_report.php プロジェクト: sarakm/jjel
    $_SESSION['report_values'][$i][5] = '"' . $row["qty"] . '"      ';
    $_SESSION['report_values'][$i][6] = '"' . $row["img"] . '"      ';
    $_SESSION['report_values'][$i][7] .= '"' . $row["catname"] . '"      ';
    $_SESSION['report_values'][$i][8] = '"' . $row["manufacturer"] . '"      ';
    $_SESSION['report_values'][$i][9] = '"' . $row["flag"] . '"      ';
    $i++;
}
#### Roshan's very simple code to export data to excel
#### Copyright reserved to Roshan Bhattarai - nepaliboy007@yahoo.com
#### if you have any problem contact me at http://roshanbh.com.np
#### fell free to visit my blog http://php-ajax-guru.blogspot.com
//code to download the data of report in the excel format
$fn = "export" . date("j l Y") . "." . "xls";
include_once "class.export_excel.php";
//create the instance of the exportexcel format
$excel_obj = new ExportExcel("{$fn}");
//setting the values of the headers and data of the excel file
//and these values comes from the other file which file shows the data
$excel_obj->setHeadersAndValues($_SESSION['report_header'], $_SESSION['report_values']);
//now generate the excel file with the data and headers set
$excel_obj->GenerateExcelFile();
/*	$a=$_SESSION['report_values'];
	$c=sizeof($a);
		
	for($j=0;$j<$c;$j++)
	{
	for($i=0;$i<10;$i++)
	{
	print_r($_SESSION['report_values'][$j][$i]." \t ");
	}
	print_r("\n");
コード例 #2
0
                $i += 1;
                $p += 50;
            }
            if ($value == 'd') {
                $i += 1;
                $p += 0;
            }
            if ($value == 'oui') {
                $i += 1;
                $p += 100;
            }
            if ($value == 'nom') {
                $i += 1;
                $p += 0;
            }
        }
        $row['datas']['pourcentage'] = sprintf('%.2f', $p / $i) . '%';
        $data[] = $row['datas'];
    }
}
//die(print_r($data));
$header = array("Communication avant...", "Commentaires", "Dates du Config...", "Commentaires", "Lieu du Config...", "Commentaires", "Qualité de l’accueil...", "Commentaires", "Disponibilité des équipes", "Commentaires", "Logement", "Commentaires", "Restauration ", "Commentaires", "Déplacements", "Commentaires", "Salles de conférence", "Commentaires", "Matériel", "Commentaires", "Tables rondes", "Commentaires", "Rythme ", "Commentaires", "Votre slot de présentation.", "Commentaires", "Votre table ronde", "Commentaires", "Activités de détente", "Commentaires", "Dîner de gala au Fuego Latino", "Commentaires", "Dîner de gala au Comptoir Darna", "Commentaires", "Le Config Partners 2015 a-t-il répondu à vos attentes ", "Commentaires", "Pensez vous que le Config Partners 2015 est un event indispensable", "Commentaires", "Y a-t-il certains aspects relatifs à l’organisation", "Commentaires", "Avez-vous des souhaits ou des suggestions ", "Commentaires", "Pensez- vous participer à la prochaine édition", "Commentaires", "Nom", "Prénom", "Email", "Société", "Pays", "Pourcentage de satisfaction");
//code to download the data of report in the excel format
$fn = "partenaires.xls";
include_once "../lib/classes/export_excel.class.php";
//create the instance of the exportexcel format
$excel_obj = new ExportExcel("{$fn}");
$excel_obj->setHeadersAndValues($header, $data);
//now generate the excel file with the data and headers set
$excel_obj->GenerateExcelFile();
//print_r($_SESSION['report_values']);
コード例 #3
0
ファイル: FiInvoice.php プロジェクト: jasonhai/onehome
 /**
  * @Author: ANH DUNG Sep 15, 2014
  * @Todo: calc report
  * @Param: $model model 
  */
 public static function ToExcelReportTrans()
 {
     if (isset($_SESSION['REPORT_TRANSACTION']['COUNT_TRANS']) && isset($_GET['to_excel'])) {
         ExportExcel::ReportTrans();
     }
 }
コード例 #4
0
 /**
  * @Author: ANH DUNG Aug 07, 2014
  */
 public function actionExport()
 {
     ExportExcel::ListingCompany();
 }
コード例 #5
0
ファイル: ProTransactions.php プロジェクト: jasonhai/onehome
 /**
  * @Author: ANH DUNG Sep 21, 2014
  * @Todo: calc report summary
  * @Param: $model model 
  */
 public static function ToExcelReport()
 {
     if (isset($_SESSION['DATA_SUMMARY_REPORT']) && isset($_GET['to_excel']) && count($_SESSION['DATA_SUMMARY_REPORT']->data)) {
         ExportExcel::SummaryReport();
     }
 }