phpexcel

Is It Possible To Generate Or Clone Pivot Tables Using PhpExcel Library?

拈花ヽ惹草 提交于 2019-12-19 02:54:24
问题 Recently i have used phpExcel library to generate reports in excel format in cakephp. Every thing is working fine except pivot Tables. I am using a master excel sheet (Which contain pivot table) to clone/generate other excel sheet. In newly generated sheet other information is looking fine but pivot table is not being generated (only names on header are being display. There is no filter options). Here is the code i am using. $filename = WWW_ROOT."files/master_report_template/compliance

Populate dropdown with phpexcel

别说谁变了你拦得住时间么 提交于 2019-12-18 13:27:58
问题 I'm running into the following problem. Im trying to get some results from my database and I want to insert the results into a dropdown list. In the examle file was the following example: $objValidation->setFormula1('"Item A,Item B,Item C"'); so the results have to be comma seperated and the total results have to be between "". Here is the code so far: $configurations = Db::getInstance()->queryResults('SELECT * FROM configurations', array($siteNumber)); $objPHPExcel->getActiveSheet()-

Using PHPExcel to export to xlsx

拟墨画扇 提交于 2019-12-18 11:57:09
问题 I am using PHPEXxcel to export an HTML Table generated using MYSQL and its like this. <?php $query = "SELECT `Firstname`,`Lastname`,`Branch`,`Gender`,`Mobileno`, `Email` FROM `student_details` WHERE Branch IN ('$branch') and `Year`='$year' and Tenthresult > '$tenth' and Twelthresult > '$twelth' and (CGPA > '$cgpa' || CGPA = '$cgpa')"; $result = mysql_query($query); confirm_query($result); $objPHPExcel = new PHPExcel(); $objPHPExcel->setActiveSheetIndex(0); $rowCount = 1; $objPHPExcel-

PHPExcel - error while trying to insert image after loading and writing

跟風遠走 提交于 2019-12-18 09:06:49
问题 i saw this problem in so many posts. but none have been answered. first time when I insert image in an excel file, no problem is there.but if i load that excel file again and try to insert another image in another cell,following problem occurs: Fatal error: Uncaught exception 'PHPExcel_Writer_Exception' with message 'File zip://C:\xampp\htdocs\Well\test.xlsx#xl/media/well1.bmp does not exist' in C:\xampp\htdocs\Well\Classes\PHPExcel\Writer\Excel2007\ContentTypes.php:242 Stack trace: #0 C:

PHPExcel File format or extension is not valid

▼魔方 西西 提交于 2019-12-18 08:48:20
问题 I'm using phpexcel for export my query in excel file; however after I created file(which is xslx format), I can not open my file in excel. It gives "the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the file format of the file" error. When I open the file in texteditor(mine is npp) I see my php file's css codes and some part of my html codes. My code is like that; if( ! empty($_POST['export'])){ $query = "SELECT * FROM

PHPExcel File format or extension is not valid

左心房为你撑大大i 提交于 2019-12-18 08:48:12
问题 I'm using phpexcel for export my query in excel file; however after I created file(which is xslx format), I can not open my file in excel. It gives "the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the file format of the file" error. When I open the file in texteditor(mine is npp) I see my php file's css codes and some part of my html codes. My code is like that; if( ! empty($_POST['export'])){ $query = "SELECT * FROM

How to configure phpexcel for pdf

試著忘記壹切 提交于 2019-12-18 04:23:32
问题 i've been searching in the official docs but i can't seem to put all the things together in my mind (i'm new to programming). I managed to use the excel library and it's working super, but now i want to offer the user the chance to choose between downloading the file in .xls or in .pdf. I'm using Codeigniter and WAMP. I downloaded PHPExcel, and it's on my C: directory. Later i copied Classes: PHPExcel (folder) and PHPExcel.php to my codeigniter's third party folder. Then, inside Codeigniter's

PHPExcel: Read all values (date, time, numbers) as strings

那年仲夏 提交于 2019-12-18 04:03:22
问题 I am facing issues with dates and time. I want them to be read just like they appear in the excel workbook. So, I believe if I get all cells of the sheet using toArray(), then I should simply do something (some format conversion) that will map all cells as strings, dates, times etc. OR may be there is function like load, which load all data in the workbook as string without any formating or other complex stuff. 回答1: toArray() supports the following arguments: /** * @param mixed $nullValue

PHPExcel error in CodeIgniter “Unable to load the requested class: iofactory”

天涯浪子 提交于 2019-12-18 03:46:48
问题 I'm trying to export an XLS file with PHPExcel 1.7.8 + CodeIgniter 2.1.3 I have followed all the instructions from PHPExcel but I'm getting this error: Unable to load the requested class: iofactory and here's my Controller code: //expoxt to excel all admin data function export_excel_admin() { //$data['resultsadmin'] = $this->admin_model->get_all_data_admin(); //var_dump($data['resultsadmin']); //$this->load->view('administrator/export_excel/export_excel_admin', $data); $query = $this->db->get

PHPExcel Make first row bold

喜夏-厌秋 提交于 2019-12-17 22:12:14
问题 I am trying to make cells in first row are bold. This is the method I have created for that purpose. function ExportToExcel($tittles,$excel_name) { $objPHPExcel = new PHPExcel(); $objRichText = new PHPExcel_RichText(); // Set properties $objPHPExcel->getProperties()->setCreator("SAMPLE1"); $objPHPExcel->getProperties()->setLastModifiedBy("SAMPLE1"); $objPHPExcel->getProperties()->setTitle("SAMPLE1"); $objPHPExcel->getProperties()->setSubject("SAMPLE1"); $objPHPExcel->getProperties()-