Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all 2707 articles
Browse latest View live

New Post: Call-time pass-by-reference has been removed error not sure how to fix

$
0
0
I am trying to use this PHPExcel and I followed the instructions found here
http://honoluluhacker.com/2007/03/15/php-excel-writer/

I am trying to get this to work on a Godaddy hosting account.
I am getting the below error message and not sure how to fix it, any suggestions?

Fatal error: Call-time pass-by-reference has been removed in Spreadsheet/Excel/Writer/Worksheet.php on line 2490

thanks

New Post: Call-time pass-by-reference has been removed error not sure how to fix

$
0
0
Please note that the PEAR Spreadsheet Excel Writer that you are trying to install is not PHPExcel

New Post: issue with PHPExcel_Reader_

$
0
0
The only circumstance in which this error could occur is if no Reader name or an empty Reader name was passed when instantiating the reader

New Post: comments default show

$
0
0
Also, i mean: 'As indicated on the tab'.
What is the command I can adjust this?

New Post: Unreadable content

$
0
0
Just my 2c:
I had this issue too and in my case it was caused by writing a special latin1 character "ë" into the description:
$description = 'Geëxporteerd';
$objPHPExcel->getProperties()->setDescription($description);

PHPExcel doesn't check the encoding of strings being set. My site is in latin1 encoding and PHPExcel expects UTF-8.

So the solution turned out to be:
$objPHPExcel->getProperties()->setDescription(mb_convert_encoding($description, 'UTF-8'));

New Post: getVisible(): how to skip hidden rows

$
0
0
Hi there,

I'm using PHPExcel to read some spreadsheets which happen to have some rows hidden. I want to ignore those rows, for that I think I should use attribute getVisible() but I don't know how to integrate it in my code.

Could somebody help?

After loading/reading the input file, the My PHP code looks like this:
    $sheet = $objPHPExcel->getSheet(2);
    $highestColumn = $sheet->getHighestColumn();
    
    //  Loop through each row of the worksheet in turn
    for ($rowNum = 8; $rowNum <= $highestRow; $rowNum++){ 
        //  Read a row of data into an array
        $rowData = $sheet->rangeToArray('D' . $rowNum . ':' . 'F' . $rowNum, NULL, TRUE, FALSE); 
    }
Thanks a lot in advance.

Cheers, Manuel

New Post: getVisible(): how to skip hidden rows

$
0
0
Assuming that you've loaded this workbook with the Excel2007 Reader, there is a known problem with that Reader loading hidden rows, which has been fixed in the latest develop branch on github

New Post: Error PHPExcel/Writer/.php

$
0
0
Hello,

I get an error to write in excel document that I can not solve!
<?PHP
$path = './';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
function __autoload($classe)
{
$fichier = str_replace('_',DIRECTORY_SEPARATOR, $classe ) . '.php' ;
require_once($fichier) ; # Chargement de la classe.
}
 
$objet = new PHPExcel_Reader_Excel5();
$excel = $objet->load('../Examples/export-commande.xls');
$writer = new PHPExcel_Writer_Excel5($excel);
$writer->save('autreFichier.xls');
 
$objet = PHPExcel_IOFactory::createReader('Excel5');
$excel = $objet->load('export-commande.xls');
$sheet = $excel->getSheet(0);
$sheet->setCellValue('A50', 'MaitrePylos');
$writer = PHPExcel_IOFactory::createWriter($excel);
$writer->save('Exemple14.xls');
?>
[code]
 
PHPExcel_Reader_Excel5
 
PHPExcel\Reader\Excel5.php
 
PHPExcel_Shared_String
 
PHPExcel\Shared\String.php
 
PHPExcel_Reader_Abstract
 
PHPExcel\Reader\Abstract.php
 
PHPExcel_Reader_IReader
 
PHPExcel\Reader\IReader.php
 
PHPExcel_Reader_DefaultReadFilter
 
PHPExcel\Reader\DefaultReadFilter.php
 
PHPExcel_Reader_IReadFilter
 
PHPExcel\Reader\IReadFilter.php
 
PHPExcel_Shared_OLERead
 
PHPExcel\Shared\OLERead.php
 
PHPExcel
 
PHPExcel.php
 
PHPExcel_Calculation
 
PHPExcel\Calculation.php
 
PHPExcel_Calculation_Function
 
PHPExcel\Calculation\Function.php
 
PHPExcel_CalcEngine_CyclicReferenceStack
 
PHPExcel\CalcEngine\CyclicReferenceStack.php
 
PHPExcel_CalcEngine_Logger
 
PHPExcel\CalcEngine\Logger.php
 
PHPExcel_Worksheet
 
PHPExcel\Worksheet.php
 
PHPExcel_IComparable
 
PHPExcel\IComparable.php
 
PHPExcel_CachedObjectStorageFactory
 
PHPExcel\CachedObjectStorageFactory.php
 
PHPExcel_CachedObjectStorage_Memory
 
PHPExcel\CachedObjectStorage\Memory.php
 
PHPExcel_CachedObjectStorage_CacheBase
 
PHPExcel\CachedObjectStorage\CacheBase.php
 
PHPExcel_CachedObjectStorage_ICache
 
PHPExcel\CachedObjectStorage\ICache.php
 
PHPExcel_Worksheet_PageSetup
 
PHPExcel\Worksheet\PageSetup.php
 
PHPExcel_Worksheet_PageMargins
 
PHPExcel\Worksheet\PageMargins.php
 
PHPExcel_Worksheet_HeaderFooter
 
PHPExcel\Worksheet\HeaderFooter.php
 
PHPExcel_Worksheet_SheetView
 
PHPExcel\Worksheet\SheetView.php
 
PHPExcel_Worksheet_Protection
 
PHPExcel\Worksheet\Protection.php
 
PHPExcel_Worksheet_RowDimension
 
PHPExcel\Worksheet\RowDimension.php
 
PHPExcel_Worksheet_ColumnDimension
 
PHPExcel\Worksheet\ColumnDimension.php
 
PHPExcel_Worksheet_AutoFilter
 
PHPExcel\Worksheet\AutoFilter.php
 
PHPExcel_DocumentProperties
 
PHPExcel\DocumentProperties.php
 
PHPExcel_DocumentSecurity
 
PHPExcel\DocumentSecurity.php
 
PHPExcel_Style
 
PHPExcel\Style.php
 
PHPExcel_Style_Supervisor
 
PHPExcel\Style\Supervisor.php
 
PHPExcel_Style_Font
 
PHPExcel\Style\Font.php
 
PHPExcel_Style_Color
 
PHPExcel\Style\Color.php
 
PHPExcel_Style_Fill
 
PHPExcel\Style\Fill.php
 
PHPExcel_Style_Borders
 
PHPExcel\Style\Borders.php
 
PHPExcel_Style_Border
 
PHPExcel\Style\Border.php
 
PHPExcel_Style_Alignment
 
PHPExcel\Style\Alignment.php
 
PHPExcel_Style_NumberFormat
 
PHPExcel\Style\NumberFormat.php
 
PHPExcel_Style_Protection
 
PHPExcel\Style\Protection.php
 
PHPExcel_Shared_CodePage
 
PHPExcel\Shared\CodePage.php
 
PHPExcel_Shared_OLE
 
PHPExcel\Shared\OLE.php
 
PHPExcel_Shared_Date
 
PHPExcel\Shared\Date.php
 
PHPExcel_Cell
 
PHPExcel\Cell.php
 
PHPExcel_Cell_DataType
 
PHPExcel\Cell\DataType.php
 
PHPExcel_Writer_Excel5
 
PHPExcel\Writer\Excel5.php
 
PHPExcel_Writer_Abstract
 
PHPExcel\Writer\Abstract.php
 
PHPExcel_Writer_IWriter
 
PHPExcel\Writer\IWriter.php
 
PHPExcel_Writer_Excel5_Parser
 
PHPExcel\Writer\Excel5\Parser.php
 
PHPExcel_WorksheetIterator
 
PHPExcel\WorksheetIterator.php
 
PHPExcel_Calculation_Functions
 
PHPExcel\Calculation\Functions.php
 
PHPExcel_Writer_Excel5_Workbook
 
PHPExcel\Writer\Excel5\Workbook.php
 
PHPExcel_Writer_Excel5_BIFFwriter
 
PHPExcel\Writer\Excel5\BIFFwriter.php
 
PHPExcel_Writer_Excel5_Worksheet
 
PHPExcel\Writer\Excel5\Worksheet.php
 
PHPExcel_Writer_Excel5_Xf
 
PHPExcel\Writer\Excel5\Xf.php
 
PHPExcel_Writer_Excel5_Font
 
PHPExcel\Writer\Excel5\Font.php
 
PHPExcel_Shared_OLE_PPS_File
 
PHPExcel\Shared\OLE\PPS\File.php
 
PHPExcel_Shared_OLE_PPS
 
PHPExcel\Shared\OLE\PPS.php
 
PHPExcel_Shared_Font
 
PHPExcel\Shared\Font.php
 
PHPExcel_Shared_OLE_PPS_Root
 
PHPExcel\Shared\OLE\PPS\Root.php
 
PHPExcel_Shared_File
 
PHPExcel\Shared\File.php
 
PHPExcel_IOFactory
 
PHPExcel\IOFactory.php
 
PHPExcel_Cell_DefaultValueBinder
 
PHPExcel\Cell\DefaultValueBinder.php
 
PHPExcel_Cell_IValueBinder
 
PHPExcel\Cell\IValueBinder.php
 
PHPExcel_Writer_
 
PHPExcel\Writer\.php
Warning: require_once(PHPExcel/Writer/.php): failed to open stream: No such file or directory in /var/www/com/Classes/exemple-export-commande-v2.php on line 17 Fatal error: require_once(): Failed opening required 'PHPExcel/Writer/.php' (include_path='.:/usr/share/php:/usr/share/pear:./') in /var/www/com/Classes/exemple-export-commande-v2.php on line 17
How to fix error?

(Sorry don't speak english)

guigui69

New Post: Error PHPExcel/Writer/.php

$
0
0
You need to specify which writer you want to use.

e.g.
$writer = PHPExcel_IOFactory::createWriter($excel);
should be
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');
if you want to write a .xlsx file

or
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
if you want to write a .xls file

New Post: How to clear all cells style(formating)

$
0
0
Hello All,

I am using the PHPExcel library for excel sheet related works like ( reading the data from excelsheet, writing the data to the excelsheet).

In that we have one clarification. Please clarify.

When I import a new excel spreadsheet, I need to remove all styling/formatting through PHPExcel?. Please suggest the solution.

We tried with foreach it took much time. Is any method available to clear the styles/formatting for a spreadsheet.

Awaiting for your response.

Thanks
Mohamed

New Post: How to clear all cells style(formating)

$
0
0
There is no method for this purpose. My best suggestion would be to load one workbook, instantiate another new workbook, then use loop through the worksheets using toArray() and fromArray() to copy data from the original to the new (unstyled) workbook

New Post: Fixed scale in chart

$
0
0
Hello,

Anyone as a solution to this question, I have the same issue, a chart bar with value between 0 and 100 and I can't rendering this. The data doesn't start to 0 if no 0 value are in the series.

The last solution is to modify the Excel file to change manually the scaled minimum and maximum, not a real good use :(

Thank's a lot for answer.

New Post: Error phpexcel formula calculator

$
0
0
hello,phpexcel‘s friends:

In the excel table in the predefined formula, the use of phpexcel if a column is inserted into a 0, 0 and the other a column calculation formula, it can not be used.

New Post: getVisible(): how to skip hidden rows

$
0
0
Thank you, Mark!

I'm not sure whether I'm using Excel 2007 Reader. My code for loading the file is:
        $inputFileType = PHPExcel_IOFactory::identify($inputFileName);
        $objReader = PHPExcel_IOFactory::createReader($inputFileType);
        $objPHPExcel = $objReader->load($inputFileName);
I'm using PHPExcel version 1.7.9, 2013-06-02.

I understand that the fix you mention hasn't been released yet in the stable version of PHPExcel. Is my understanding correct? If yes, is there any forecast of when it will be?

Thanks again!

Cheers, Manuel

New Post: CSV FILE CONVERTING BIG INTERGER AS EXCEL DEFAULT VALUE LIKE 4.04623E+12

$
0
0
Hi,
I have a big interger 4046228043128. I want this number as it is when it writes into csv file. But when i write into csv file that number converts into 4.04623E+12 format. But when i try to write in .xls / .xlsx file that number is displaying as it is. Below is the code i am using .
$objPHPExcel2->getActiveSheet()->getStyle('D'.$s)->getNumberFormat()->setFormatCode( PHPExcel_Style_NumberFormat::FORMAT_TEXT);
$objPHPExcel2->getActiveSheet()->setCellValueExplicit('D'.$s, $csvrow['EXTERNAL_ID']);

For .xls i am using the below code
->setCellValueExplicit('D'.$s, $csvrow['EXTERNAL_ID'],PHPExcel_Cell_DataType::TYPE_STRING)
this one works fine for me .But when file type is csv i am getting the problem.

Please help me in this regard.

Thanks in advance.

New Post: Needs a minute to read a few rows

$
0
0
I need to read a 7MB *.xlsx file that contains like a million cells (in 21 column rows). With the chunked reader code in the wiki I've been able to reduce the memory footprint from 1GB+ to 28MB but I still have execution time issues. In my reasonably fast developer box, it still needs more than one minute to load a couple of rows (i.e., 22 cells). This time remains constant when I load 10 or 100 rows. Am I doing something wrong or is that the expected processing time?

My code is:
$filename = '/path/to/test.xlsx';

$chunkFilter = new chunkReadFilter();
$chunkFilter->setRows(2, 1);

$oReader = PHPExcel_IOFactory::createReaderForFile($filename);
$oReader->setReadDataOnly(true);
$oReader->setReadFilter($chunkFilter);
$oPHPExcel = $oReader->load($filename);
... where chunkReadFilter is copied from Reading Spreadsheet Files. So far I'm not doing anything else, just load().

My specs: PHPExcel/1.7.9 + PHP/5.5.8 on Windows 7

New Post: Data Validation doesn't work with copy and paste?

$
0
0
My code below enable my cell to only accept 1, 2, 3 or 4, but if the user copied a invalid value and paste it in the cell, it doesn't stop them.

Since the range part of TYPE_WHOLE doesn't work on Excel5, I have to use TYPE_LIST.

Any suggestions? Thx.
                //data validation; only accept 1, 2, 3 or 4
                $objValidation = $objSheet->getCell($cellIndex)->getDataValidation();

                $objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
                $objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP );
                $objValidation->setAllowBlank(false);
                $objValidation->setShowInputMessage(true);
                $objValidation->setShowErrorMessage(true);
                $objValidation->setShowDropDown(true);
                $objValidation->setErrorTitle('Input error');
                $objValidation->setError('It has to be 1, 2, 3 or 4.');
                $objValidation->setPromptTitle('Pick from list');
                $objValidation->setPrompt('Please pick a value from the drop-down list.');
                $objValidation->setFormula1('"1,2,3,4"');

New Post: Add all rows to excel spread sheet

$
0
0
I have form that posts to Mysql and all works fine for 1 row only. How would I get it to post all the new lines from the form?

My database looks like this:



id|number|user|date
34 - 45 - DJ - 23/01
35 - 46 - TR - 12/02
36 - 57 - PU - 08/01
$objPHPExcel->getActiveSheet()->SetCellValue('B2', $row['UNIT']);
$objPHPExcel->getActiveSheet()->SetCellValue('C2', $row['NUMBER']);
$objPHPExcel->getActiveSheet()->SetCellValue('D2', $row['USER']);
$objPHPExcel->getActiveSheet()->SetCellValue('E2', $row['DATE']);

New Post: Data Validation doesn't work with copy and paste?

$
0
0
The problem comes from Excel and is not easy to solve. Using macros which verify what is pasted, but I saw no solutions that handle all cases, moreover, PHPExcel manages not macros in Excel 5 (the last version in development does in Excel 2007)

New Post: Classes\PHPExcel\Writer\Excel2007.php on line 205

$
0
0
I am new and haveing problems setting up. The subject error comes up and I am stuck.
Viewing all 2707 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>