Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad count of sheets with ods file #190

Open
GoogleCodeExporter opened this issue Jul 24, 2015 · 0 comments
Open

Bad count of sheets with ods file #190

GoogleCodeExporter opened this issue Jul 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I have an xlsx file with 4 sheets. Under Ubuntu, I saved the file in ods format.

I open this files with this code : 
set_include_path ( get_include_path () . PATH_SEPARATOR . 
'plugins/phpExcel-1.8.0/Classes/' );
include 'PHPExcel/IOFactory.php';
(...)
switch ($ext) {
case 'xls' :
$inputFileType = $objReader = new PHPExcel_Reader_Excel5 ();
break;
case 'ods' :
$objReader = new PHPExcel_Reader_OOCalc ();
break;
case 'xlsx' :
default :
$objReader = new PHPExcel_Reader_Excel2007 ();
}
$objReader->setLoadAllSheets ();
$excel = $objReader->load ( $_FILES ['upfile'] ['tmp_name'] );
$nbfeuille = $excel->getSheetCount ();

With ods file, getSheetCount() found 5 sheets, and the last is empty. In 
libreoffice, I have only 4 sheets.

Tanks.

Original issue reported on code.google.com by [email protected] on 17 Jun 2014 at 7:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant