当前位置: 首页>>代码示例>>PHP>>正文


PHP ExportToExcel函数代码示例

本文整理汇总了PHP中ExportToExcel函数的典型用法代码示例。如果您正苦于以下问题:PHP ExportToExcel函数的具体用法?PHP ExportToExcel怎么用?PHP ExportToExcel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ExportToExcel函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exportTo

 /**
  * @param String type
  * @param Mixed rs
  * @param Number nPageSize
  */
 public function exportTo($type, $rs, $nPageSize)
 {
     global $locale_info;
     if (substr(@$type, 0, 5) == "excel") {
         //	remove grouping
         $locale_info["LOCALE_SGROUPING"] = "0";
         $locale_info["LOCALE_SMONGROUPING"] = "0";
         ExportToExcel($rs, $nPageSize, $this->eventsObject, $this->cipherer, $this);
         return;
     }
     if ($type == "word") {
         $this->ExportToWord($rs, $nPageSize);
         return;
     }
     if ($type == "xml") {
         $this->ExportToXML($rs, $nPageSize);
         return;
     }
     if ($type == "csv") {
         $locale_info["LOCALE_SGROUPING"] = "0";
         $locale_info["LOCALE_SDECIMAL"] = ".";
         $locale_info["LOCALE_SMONGROUPING"] = "0";
         $locale_info["LOCALE_SMONDECIMALSEP"] = ".";
         $this->ExportToCSV($rs, $nPageSize);
     }
 }
开发者ID:kcallow,项目名称:MatchMe,代码行数:31,代码来源:exportpage.php

示例2: elseif

 if ($listarray !== false) {
     $rs = $listarray;
 } elseif ($nPageSize > 0) {
     $rs = db_query($strSQL, $conn);
 } else {
     $rs = db_query($strSQL, $conn);
 }
 if (!ini_get("safe_mode")) {
     set_time_limit(300);
 }
 if (substr(@$_REQUEST["type"], 0, 5) == "excel") {
     //	remove grouping
     $locale_info["LOCALE_SGROUPING"] = "0";
     $locale_info["LOCALE_SMONGROUPING"] = "0";
     if ($phpVersion > 4) {
         ExportToExcel($cipherer, $pageObject);
     } else {
         ExportToExcel_old($cipherer);
     }
 } else {
     if (@$_REQUEST["type"] == "word") {
         ExportToWord($cipherer);
     } else {
         if (@$_REQUEST["type"] == "xml") {
             ExportToXML($cipherer);
         } else {
             if (@$_REQUEST["type"] == "csv") {
                 $locale_info["LOCALE_SGROUPING"] = "0";
                 $locale_info["LOCALE_SDECIMAL"] = ".";
                 $locale_info["LOCALE_SMONGROUPING"] = "0";
                 $locale_info["LOCALE_SMONDECIMALSEP"] = ".";
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:pad_pad_daftar_hist_export.php

示例3: elseif

 if ($listarray !== false) {
     $rs = $listarray;
 } elseif ($nPageSize > 0) {
     $rs = db_query($strSQL, $conn);
     db_pageseek($rs, $nPageSize, $mypage);
 } else {
     $rs = db_query($strSQL, $conn);
 }
 if (!ini_get("safe_mode")) {
     set_time_limit(300);
 }
 if (substr(@$_REQUEST["type"], 0, 5) == "excel") {
     //	remove grouping
     $locale_info["LOCALE_SGROUPING"] = "0";
     $locale_info["LOCALE_SMONGROUPING"] = "0";
     ExportToExcel();
 } else {
     if (@$_REQUEST["type"] == "word") {
         ExportToWord();
     } else {
         if (@$_REQUEST["type"] == "xml") {
             ExportToXML();
         } else {
             if (@$_REQUEST["type"] == "csv") {
                 $locale_info["LOCALE_SGROUPING"] = "0";
                 $locale_info["LOCALE_SDECIMAL"] = ".";
                 $locale_info["LOCALE_SMONGROUPING"] = "0";
                 $locale_info["LOCALE_SMONDECIMALSEP"] = ".";
                 ExportToCSV();
             }
         }
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:31,代码来源:Anomalies_export.php

示例4: strtotime

     $row++;
 }
 //$x = (array)$cselected["students"][0];
 //echo $x[7926]->id;
 //echo key_exists(109882, $x);
 if ($export) {
     //print_table($table, true);
     //$category = get_record('course_categories', 'id', $categoryid);
     $table->category = $category->name;
     $table->schoolname = $school->name;
     $table->semester = $semester;
     $durationend = strtotime("+{$temp_course->numsections} weeks", $temp_course->timemodified);
     $table->end_duration = date(" M jS, Y", $durationend);
     $table->start_duration = date(" M jS, Y", $temp_course->timemodified);
     //$table->duration = date("d M Y", $cselected["startdate"][0]).' to '.date("d M Y", time('now'));
     ExportToExcel($table);
 } else {
     /*foreach($cselected["id"] as  $courseid){
     	 	$sql="select verified from mdl_grade_items where courseid=$courseid and itemname='Grades'";
     	 	//echo $sql;
     	 	$verification=$DB->get_record_sql($sql);
     	 	if(isset($verification->verified))
     	 	$grades_verification[]=$verification->verified;
     	 }*/
     //print_r($cselected["id"]);
     echo '<div style="text-align: center; font-weight: bold;"><u>' . $school->name . '</u><br></div>';
     echo '<div style="text-align: center; font-weight: bold;"><u>On Campus Semester Result Information</u><br></div>';
     $Duration_end = strtotime("+{$temp_course->numsections} weeks", $temp_course->timemodified);
     echo '<div style="text-align: center; font-weight: bold;"><br/>Semester: ' . $semester . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Duration: ' . date(" M jS, Y", $temp_course->timemodified) . '-' . date(" M jS, Y", $Duration_end) . '</div>';
     echo '<div style="text-align: left; padding-left: 20px; margin: 5px 0;">
                     <form method="post" style="display: inline; margin: 0; padding: 0;">';
开发者ID:nustlms,项目名称:moodle-block_custom_reports,代码行数:31,代码来源:semester_results.php

示例5: foreach

 $datas[$i]["totalmarked"] = "<b>Total</b>";
 $datas[$i]["missedlec"] = "<b>Lecture</b>";
 $datas[$i]["missedlab"] = "<b>Labs</b>";
 $datas[$i]["totalmissed"] = "<b>Total</b>";
 $datas[$i]["remarks"] = "";
 if ($sort or $export) {
     $i = 0;
     foreach ($courses as $course) {
         $data[$i]["sno"] = $i + 1;
         $i++;
     }
 }
 $data = array_merge($datas, $data);
 $table->data = $data;
 if ($export) {
     ExportToExcel($table, $perd, $weeks);
 } else {
     echo '<div style="text-align: center; font-weight: bold;">Missing Lectures Report<br></div>';
     echo '<div style="text-align: left; padding-left: 20px; margin: 5px 0;">';
     if (!$sort) {
         $perd = date("d-m-Y", $courses[0]->startdate) . " ) - ( " . date("d-m-Y", $endtime);
     }
     echo '<div style="text-align: center; font-weight: bold;">Period : ( ' . $perd . ' )</div>';
     echo '<div style="text-align: center; font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Weeks: ' . $weeks . '</b></div>';
     echo '<form method="post" style="display: inline; margin: 0; padding: 0;">';
     echo '<input type="hidden" name="courses" value="' . rtrim($export_courses, ',') . '" />';
     echo '<input type="hidden" name="id" value="' . $categoryid . '" />';
     echo '<input type="hidden" name="perod" value="' . $perd . '" />';
     echo "<b>Sort By:</b>";
     echo "<select name='sortby' id='sortby'>";
     echo "<option value='dept'>Department</option>";
开发者ID:nustlms,项目名称:moodle-block_custom_reports,代码行数:31,代码来源:missinglectures.php

示例6: db_query

	{
					$rs = db_query($strSQL,$conn);
	}
	else
		$rs = db_query($strSQL,$conn);

	if(!ini_get("safe_mode"))
		set_time_limit(300);
	
	if(substr(@$_REQUEST["type"],0,5)=="excel")
	{
//	remove grouping
		$locale_info["LOCALE_SGROUPING"]="0";
		$locale_info["LOCALE_SMONGROUPING"]="0";
				if($phpVersion > 4)
			ExportToExcel($rs, $nPageSize, $eventObj, $cipherer, $pageObject);
		else
			ExportToExcel_old($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	else if(@$_REQUEST["type"]=="word")
	{
		ExportToWord($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	else if(@$_REQUEST["type"]=="xml")
	{
		ExportToXML($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	else if(@$_REQUEST["type"]=="csv")
	{
		$locale_info["LOCALE_SGROUPING"]="0";
		$locale_info["LOCALE_SDECIMAL"]=".";
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:31,代码来源:webreport_users_export.php

示例7: foreach

            foreach ($courses as $course) {
                $sn = 1;
                $table->data[$i][] = $sn;
                $table->data[$i][] = $course->fullname;
                $sn++;
                $i++;
            }
            if (empty($courses)) {
                $table->data[$i][] = "";
                $table->data[$i][] = "Not registered";
                $i++;
            }
        }
        //echo html_writer::table($table);
        if ($export) {
            ExportToExcel($table, $uname, $uidnumber);
        } else {
            echo '<form method="post" style="display: inline; margin: 0; padding: 0;">';
            echo '<input type="hidden" name="courses" value="' . rtrim($export_courses, ',') . '" />';
            echo '<input type="hidden" name="id" value="' . $categoryid . '" />';
            echo '<input type="hidden" name="user" value="' . $user . '" />';
            echo '<input type="hidden" name="export" value="true" /><input type="submit" value="Download Excel" />';
            echo "<br/><b>Name:</b>" . $uname;
            echo "<br/><b>Reg No:</b>" . $uidnumber . "<br/>";
            echo html_writer::table($table);
            echo '</form></div>';
        }
    }
} else {
    $OUTPUT->box_start('generalbox categorybox');
    echo '<form method="post" action="std_semestereport.php?id=2" style="display: inline; margin: 0; padding: 0;">';
开发者ID:nustlms,项目名称:moodle-block_custom_reports,代码行数:31,代码来源:std_semestereport.php


注:本文中的ExportToExcel函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。