10
I Use This!
Inactive

News

Analyzed about 7 hours ago. based on code collected about 7 hours ago.
Posted about 10 years ago by ulrik_pedersen
What type of formating can prevent PHPExcel from reading dato from a cell? I'm using the string $cellContent = $objPHPExcel->getActiveSheet()->getCell($cellID)->getValue(); var_dump ($cellContent); The var_dump returns null when ... [More] $cellID has certain values even though I now the cell holds a string. The cells are merged but I have reconstructed the sheet and there i have no trouble at all reading the exact same merged cells. The production sheet is locked for editing but I don't think that it should give any trouble as I can read other cells in the sheet. [Less]
Posted about 10 years ago by Mikhail777
Rated 5 Stars (out of 5) - dasasasasasasdasdasd
Posted about 10 years ago by hanni
I have a template (xlsx) including 2 charts (file have 4 datasheets, both column charts are on datasheet 1) and I just want to export this file again. Everything seems to work fine and the charts are also recognized but the exported excel is corrupt. ... [More] When I try to open it, Excel remove the charts in the "open and repair" action. Any ideas?I'm using PHPExcel 1.8, that's my code:$inputFileName = dirname(__FILE__) . '/test.xlsx';$objPHPExcel = new \PHPExcel();$objReader = \PHPExcel_IOFactory::createReader('Excel2007');$objReader->setIncludeCharts(TRUE);$objPHPExcel = $objReader->load($inputFileName);//test if charts are recognizedforeach ($objPHPExcel->getWorksheetIterator() as $worksheet) { $sheetName = $worksheet->getTitle(); //var_dump('Worksheet: ' , $sheetName , EOL); $chartNames = $worksheet->getChartNames(); if(empty($chartNames)) { //var_dump(' There are no charts in this worksheet' , EOL); } else { natsort($chartNames); foreach($chartNames as $i => $chartName) { $chart = $worksheet->getChartByName($chartName); if (!is_null($chart->getTitle())) { $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"'; } else { $caption = 'Untitled'; } //var_dump(' ' , $chartName , ' - ' , $caption , EOL); } } }header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');header('Content-Disposition: attachment;filename="temp.xlsx"');header('Cache-Control: max-age=0');$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, $format['format']);$objWriter->setIncludeCharts(TRUE);$objWriter->save('php://output'); [Less]
Posted about 10 years ago by neeleshoms
You can use below code to read and write graph on excel :- error_reporting(E_ALL); date_default_timezone_set('Europe/London'); require_once '../Classes/PHPExcel/IOFactory.php'; require_once '../Classes/PHPExcel.php'; $excel2 = ... [More] PHPExcel_IOFactory::createReader('Excel2007'); /Enable chart read on excel/ $excel2->setIncludeCharts(TRUE); /Enable chart read on excel/ $excel2 = $excel2->load('excelname.xlsx'); // Empty Sheet /update cell data if you required / $excel2->getActiveSheet()->setCellValue('B6', '2'); $excel2->getActiveSheet()->setCellValue('B7', '1'); $excel2->getActiveSheet()->setCellValue('B8', '3'); /-----------------------------/ $objWriter = PHPExcel_IOFactory::createWriter($excel2, 'Excel2007'); /Enable chart write on excel/ $objWriter->setIncludeCharts(TRUE); /Enable chart write on excel/ $objWriter->save('excelout.xlsx'); [Less]
Posted about 10 years ago by kimanthonygroves
// show the field value in bold $objRichText = new PHPExcel_RichText(); $objRichText->createText("Test Label : "); $objPayable = $objRichText->createTextRun("Test Value"); ... [More] $objPayable->getFont()->setBold(true); // set the rich text value instead of a normal value $objWorksheet->getCell("A1")->setValue($objRichText);I have this code in a function which writes out a collection of property values into a work sheet as a form of page header in a document.The output looks fine in desktop Excel.If I email the file to myself to view on the iPad, this part of the page does not render correctly. The cells are blank.I opened the file in Excel and then-resaved the file and re-sent it to the iPad.This file rendered accurately.I unzipped both files on the desktop and attempted a comparison between the contents.I did find some differences between the way the RichText object was being handled.If I created a simple file demonstrating this issue would anybody here have a look at it?I would love to fix it myself if I could to help everybody out. I would have to study the Office Format specification and try and see if there were any issues with the implementation. Or I could try and reverse engineer it well enough to suit my purposes but I wouldn't want to pollute the code base with my changes in that case.For the time being I have re-written the document format to not require the RichText object.Kim Groves [Less]
Posted about 10 years ago by kimanthonygroves
I am having similar issues with PHPExcel and the Apple iPad and iPhone. Spreadsheet looks great in Microsoft Windows. I am using Excel2007 writer. On the iPad/iPhone in the Mail app, the attachment can be previewed. Some cells are shown without ... [More] the contents. There may still be borders applied to the cell. In my case, I have a produced a order form for my client to send to their customer accounts. The form consists of 3 parts : 1) Document header showing the company contact information ie who is sending out the order form. 2) Section related to the recipient ie business address, phone number, recipient name and email address. 3) A list of items that they may like to order this week. (This list is read from their database system and is different for each account). It is the second section which is messing up. The space is reserved on the sheet correctly, but the section shows none of the data and only some formatting ie cell borders. I am currently testing the form using the Excel5 writer to see if there is any difference. My concern is that Excel5 may not support some of the rendering features that I have used. Kim Groves [Less]
Posted over 10 years ago by tgibson87
Even further investigation. Working server: PHP 5.3.1 Other server: PHP 5.2.8 Both support PHPExcel
Posted over 10 years ago by shiroisakura
Hi. I read file by MS Excel 2010. When I export file .xlsx use 'Excel2007', It's very ok. But when I export file .xls use 'Excel5', file incorrect format. Someone help me, plz. Thanks.
Posted over 10 years ago by PlexDNF
Rated 5 Stars (out of 5) - Great utility - thanks :)
Posted over 10 years ago by imcoderisimo
a user downloads a file from the Internet. when you try to import it with phpexcel, an error occurs. Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'You tried to set a sheet active by the out of bounds index: 1. The actual number ... [More] of sheets is 0.' if the file is open and resave, errors when importing NO! operating system locks the file content from the Internet. what to do? [Less]