phpexcel

PHPExcel data validation of numeric character

半城伤御伤魂 提交于 2020-01-06 14:12:39
问题 I tried the code on this page (codeplex phpexcel validation issue for invalid values) to validate input of numeric characters only. I also searched on the PHPExcel developer documentation and similar code appears. But when I applied it with my code and tested it, the cell does not accept even numeric characters.. may you suggest other methods on filtering or validating data input to numeric characters only. The code below is from the PHPExcel developer documentation: $objValidation =

PHPExcel factory error when reading XML from URL

柔情痞子 提交于 2020-01-06 12:51:41
问题 How to create XML reader from the URL XML data? I provide valid XML data from a URL to the PHPExcel factory's identify() but the script fires an error: ( ! ) Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message ' in C:\wamp\www\project\Classes\PHPExcel\Reader\Excel2007.php on line 82 ( ! ) PHPExcel_Reader_Exception: Could not open for reading! File does not exist. in C:\wamp\www\project\Classes\PHPExcel\Reader\Excel2007.php on line 82 $url = "http://www.w3schools.com/xml

How to merge row with same value in PHPExcel, array looping with if logic

橙三吉。 提交于 2020-01-06 05:27:08
问题 I need help for the looping logic in phpexcel, that can merge row with same transaction id here's the example code foreach ($transaction as $key => $value) { // I need if condition for $merge (ex. N4:N5) $excel->getActiveSheet()->mergeCells($merge); } i have tried some logic that compare last looping transaction id, with current transaction id. but my logic is still bad and doesnt work well. I want the result like this 回答1: The following solution was developed using PHPSpreadSheet, an upgrade

PHPExcel dynamically incrementing rows and columns

↘锁芯ラ 提交于 2020-01-05 21:21:10
问题 I am currently using PHPExcel to output an order's information to Excel. I have the following foreach-statements that ultimate generate my data such as the city in which the order was made in, the restaurant name, etc. Pardon the nested foreach-loops - it was the only way I could nest through all that many cities and legal entities and restaurants to generate the data the customer wanted. Using an answer posted here which dynamically generates the row and column integer, I tried it in my code

Using phpExcel to download xlsx file using Google App Engine

我们两清 提交于 2020-01-05 12:16:55
问题 I'm writing a php web app to create and download an xlsx file, using Google App Engine: $objPHPExcel = new PHPExcel(); $objPHPExcel->setActiveSheet(0); $objPHPExcel->getActiveSheet()->setCellValue('A1', 4); header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="01simple.xls"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit; When I run this app

PHPExcel unreadable content

China☆狼群 提交于 2020-01-05 09:24:46
问题 I am making an .xlsx file then send it via email. But when I received the file in my email. It says "unreadable content" and try to recover it. When I recover it the file is complete and intact. Nothing is missing. But I don't want that error box to appear. I am using this line of code because php_zip is not enabled on my server therefore I must use this. Without this I will get an error that says ZipArchive missing or something. PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); And

Set different font-color inside 1 cell using PHPExcel

丶灬走出姿态 提交于 2020-01-05 07:49:22
问题 I want to make the text have different color inside 1 cell using PHPExcel, but i can't find the info about it. Is it possible? I believe it can be done from the xls, but can it be done using programming, in PHPExcel? 回答1: Yes it can be done in PHPExcel, using Rich Text objects. They are described in the PHPExcel documentation and there are examples provided $objRichText = new PHPExcel_RichText(); $objRichText->createText('This invoice is '); $objPayable = $objRichText->createTextRun('payable

PHPExcel send file in email

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 03:33:11
问题 I have a site where in a page I have developed an xls report. After its creation I want to send it in a mail with phpmailer. How can I attach this file to the email? This is my code: $objPHPExcel = new PHPExcel(); // Set document properties $objPHPExcel->getProperties()->setCreator("Alessandro Minoccheri") ->setLastModifiedBy("Alessandro Minoccheri") ->setTitle("Office 2007 XLSX Test Document") ->setSubject("Office 2007 XLSX Test Document") ->setDescription("Generazione report inverter") -

Is it possible to use PHPExcel to edit an existing template file, and maintain existing formatting / spreadsheet objects

牧云@^-^@ 提交于 2020-01-04 11:43:44
问题 I'm looking for a server-side (PHP) way of manipulating / producing xls / xlsx files from MySQL data. I have an existing template xls file, with various relatively complicated cell dependant formulas and charts and such included, my hope is that I can upload this template file to my server and use PHPExcel to edit that file, and save it: allowing it to be downloaded. So my formulas are kept, the charts are kept, and I simply have to edit the data for certain cells based on values from the

Is it possible to use PHPExcel to edit an existing template file, and maintain existing formatting / spreadsheet objects

99封情书 提交于 2020-01-04 11:43:07
问题 I'm looking for a server-side (PHP) way of manipulating / producing xls / xlsx files from MySQL data. I have an existing template xls file, with various relatively complicated cell dependant formulas and charts and such included, my hope is that I can upload this template file to my server and use PHPExcel to edit that file, and save it: allowing it to be downloaded. So my formulas are kept, the charts are kept, and I simply have to edit the data for certain cells based on values from the