diff --git a/Examples/01pharSimple.php b/Examples/01pharSimple.php
index 84b86cc5..c8bf45a9 100644
--- a/Examples/01pharSimple.php
+++ b/Examples/01pharSimple.php
@@ -39,7 +39,7 @@ require_once '../Build/PHPExcel.phar';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -78,7 +78,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -93,7 +93,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/01simple-download-ods.php b/Examples/01simple-download-ods.php
index 30dbd7e3..50e8ef86 100644
--- a/Examples/01simple-download-ods.php
+++ b/Examples/01simple-download-ods.php
@@ -35,11 +35,11 @@ if (PHP_SAPI == 'cli')
die('This example should only be run from a Web Browser');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
@@ -84,6 +84,6 @@ header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'OpenDocument');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'OpenDocument');
$objWriter->save('php://output');
exit;
diff --git a/Examples/01simple-download-pdf.php b/Examples/01simple-download-pdf.php
index 133af3a6..bec75333 100644
--- a/Examples/01simple-download-pdf.php
+++ b/Examples/01simple-download-pdf.php
@@ -35,14 +35,14 @@ if (PHP_SAPI == 'cli')
die('This example should only be run from a Web Browser');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the Rendering library that you wish to use
// and its directory location on your server
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF;
-$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
+//$rendererName = PHPExcel\Settings::PDF_RENDERER_TCPDF;
+$rendererName = PHPExcel\Settings::PDF_RENDERER_MPDF;
+//$rendererName = PHPExcel\Settings::PDF_RENDERER_DOMPDF;
//$rendererLibrary = 'tcPDF5.9';
$rendererLibrary = 'mPDF5.4';
//$rendererLibrary = 'domPDF0.6.0beta3';
@@ -50,7 +50,7 @@ $rendererLibraryPath = dirname(__FILE__).'/../../../libraries/PDF/' . $rendererL
// Create new PHPExcel object
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
@@ -82,7 +82,7 @@ $objPHPExcel->getActiveSheet()->setShowGridLines(false);
$objPHPExcel->setActiveSheetIndex(0);
-if (!PHPExcel_Settings::setPdfRenderer(
+if (!PHPExcel\Settings::setPdfRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -99,6 +99,6 @@ header('Content-Type: application/pdf');
header('Content-Disposition: attachment;filename="01simple.pdf"');
header('Cache-Control: max-age=0');
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
$objWriter->save('php://output');
exit;
diff --git a/Examples/01simple-download-xls.php b/Examples/01simple-download-xls.php
index 96bb780b..49eb14f2 100644
--- a/Examples/01simple-download-xls.php
+++ b/Examples/01simple-download-xls.php
@@ -35,11 +35,11 @@ if (PHP_SAPI == 'cli')
die('This example should only be run from a Web Browser');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
@@ -84,6 +84,6 @@ header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save('php://output');
exit;
diff --git a/Examples/01simple-download-xlsx.php b/Examples/01simple-download-xlsx.php
index d441f419..0c72dc09 100644
--- a/Examples/01simple-download-xlsx.php
+++ b/Examples/01simple-download-xlsx.php
@@ -35,11 +35,11 @@ if (PHP_SAPI == 'cli')
die('This example should only be run from a Web Browser');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
@@ -84,6 +84,6 @@ header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
header ('Pragma: public'); // HTTP/1.0
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;
diff --git a/Examples/01simplePCLZip.php b/Examples/01simplePCLZip.php
index 0af4cbdd..4d74ee7a 100644
--- a/Examples/01simplePCLZip.php
+++ b/Examples/01simplePCLZip.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -85,9 +85,9 @@ echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
// Use PCLZip rather than ZipArchive to create the Excel2007 OfficeOpenXML file
-PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
+PHPExcel\Settings::setZipClass(PHPExcel\Settings::PCLZIP);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/02types-xls.php b/Examples/02types-xls.php
index 93ce17e5..82b701c8 100644
--- a/Examples/02types-xls.php
+++ b/Examples/02types-xls.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+ require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -93,28 +93,28 @@ $objPHPExcel->getActiveSheet()->setCellValue('A8', 'Boolean')
$dateTimeNow = time();
$objPHPExcel->getActiveSheet()->setCellValue('A9', 'Date/Time')
->setCellValue('B9', 'Date')
- ->setCellValue('C9', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ));
-$objPHPExcel->getActiveSheet()->getStyle('C9')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2);
+ ->setCellValue('C9', \PHPExcel\Shared\Date::PHPToExcel( $dateTimeNow ));
+$objPHPExcel->getActiveSheet()->getStyle('C9')->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_YYYYMMDD2);
$objPHPExcel->getActiveSheet()->setCellValue('A10', 'Date/Time')
->setCellValue('B10', 'Time')
- ->setCellValue('C10', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ));
-$objPHPExcel->getActiveSheet()->getStyle('C10')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4);
+ ->setCellValue('C10', \PHPExcel\Shared\Date::PHPToExcel( $dateTimeNow ));
+$objPHPExcel->getActiveSheet()->getStyle('C10')->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME4);
$objPHPExcel->getActiveSheet()->setCellValue('A11', 'Date/Time')
->setCellValue('B11', 'Date and Time')
- ->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ));
-$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME);
+ ->setCellValue('C11', \PHPExcel\Shared\Date::PHPToExcel( $dateTimeNow ));
+$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_DATETIME);
$objPHPExcel->getActiveSheet()->setCellValue('A12', 'NULL')
->setCellValue('C12', NULL);
-$objRichText = new PHPExcel_RichText();
+$objRichText = new \PHPExcel\RichText();
$objRichText->createText('你好 ');
$objPayable = $objRichText->createTextRun('你 好 吗?');
$objPayable->getFont()->setBold(true);
$objPayable->getFont()->setItalic(true);
-$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) );
+$objPayable->getFont()->setColor(new \PHPExcel\Style\Color(\PHPExcel\Style\Color::COLOR_DARKGREEN));
$objRichText->createText(', unless specified otherwise on the invoice.');
@@ -122,11 +122,11 @@ $objPHPExcel->getActiveSheet()->setCellValue('A13', 'Rich Text')
->setCellValue('C13', $objRichText);
-$objRichText2 = new PHPExcel_RichText();
+$objRichText2 = new \PHPExcel\RichText();
$objRichText2->createText("black text\n");
$objRed = $objRichText2->createTextRun("red text");
-$objRed->getFont()->setColor( new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_RED ) );
+$objRed->getFont()->setColor(new \PHPExcel\Style\Color(\PHPExcel\Style\Color::COLOR_RED ));
$objPHPExcel->getActiveSheet()->getCell("C14")->setValue($objRichText2);
$objPHPExcel->getActiveSheet()->getStyle("C14")->getAlignment()->setWrapText(true);
@@ -148,7 +148,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
$callEndTime = microtime(true);
@@ -163,7 +163,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Reload workbook from saved file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel = PHPExcel_IOFactory::load(str_replace('.php', '.xls', __FILE__));
+$objPHPExcel = \PHPExcel\IOFactory::load(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/03formulas.php b/Examples/03formulas.php
index 6c5d1ddc..121d866c 100644
--- a/Examples/03formulas.php
+++ b/Examples/03formulas.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -106,7 +106,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
//
// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the
@@ -130,7 +130,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/04printing.php b/Examples/04printing.php
index 58d5f6a8..48896a09 100644
--- a/Examples/04printing.php
+++ b/Examples/04printing.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -67,16 +67,16 @@ $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHP
// Add a drawing to the header
echo date('H:i:s') , " Add a drawing to the header" , EOL;
-$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing();
+$objDrawing = new \PHPExcel\Worksheet\HeaderFooterDrawing();
$objDrawing->setName('PHPExcel logo');
$objDrawing->setPath('./images/phpexcel_logo.gif');
$objDrawing->setHeight(36);
-$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT);
+$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, \PHPExcel\Worksheet\HeaderFooter::IMAGE_HEADER_LEFT);
// Set page orientation and size
echo date('H:i:s') , " Set page orientation and size" , EOL;
-$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
-$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(\PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4);
// Rename worksheet
echo date('H:i:s') , " Rename worksheet" , EOL;
@@ -91,7 +91,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -106,7 +106,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/05featuredemo.inc.php b/Examples/05featuredemo.inc.php
index 003379cc..624d9228 100644
--- a/Examples/05featuredemo.inc.php
+++ b/Examples/05featuredemo.inc.php
@@ -29,12 +29,12 @@
error_reporting(E_ALL);
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -51,8 +51,8 @@ $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
echo date('H:i:s') , " Add some data" , EOL;
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Invoice');
-$objPHPExcel->getActiveSheet()->setCellValue('D1', PHPExcel_Shared_Date::PHPToExcel( gmmktime(0,0,0,date('m'),date('d'),date('Y')) ));
-$objPHPExcel->getActiveSheet()->getStyle('D1')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15);
+$objPHPExcel->getActiveSheet()->setCellValue('D1', \PHPExcel\Shared\Date::PHPToExcel( gmmktime(0,0,0,date('m'),date('d'),date('Y')) ));
+$objPHPExcel->getActiveSheet()->getStyle('D1')->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_XLSX15);
$objPHPExcel->getActiveSheet()->setCellValue('E1', '#12566');
$objPHPExcel->getActiveSheet()->setCellValue('A3', 'Product Id');
@@ -115,13 +115,13 @@ $objPHPExcel->getActiveSheet()->getComment('E13')->getFillColor()->setRGB('EEEEE
// Add rich-text string
echo date('H:i:s') , " Add rich-text string" , EOL;
-$objRichText = new PHPExcel_RichText();
+$objRichText = new \PHPExcel\RichText();
$objRichText->createText('This invoice is ');
$objPayable = $objRichText->createTextRun('payable within thirty days after the end of the month');
$objPayable->getFont()->setBold(true);
$objPayable->getFont()->setItalic(true);
-$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) );
+$objPayable->getFont()->setColor(new \PHPExcel\Style\Color(\PHPExcel\Style\Color::COLOR_DARKGREEN));
$objRichText->createText(', unless specified otherwise on the invoice.');
@@ -140,7 +140,7 @@ $objPHPExcel->getActiveSheet()->protectCells('A3:E13', 'PHPExcel');
// Set cell number formats
echo date('H:i:s') , " Set cell number formats" , EOL;
-$objPHPExcel->getActiveSheet()->getStyle('E4:E13')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
+$objPHPExcel->getActiveSheet()->getStyle('E4:E13')->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
// Set column widths
echo date('H:i:s') , " Set column widths" , EOL;
@@ -153,23 +153,23 @@ echo date('H:i:s') , " Set fonts" , EOL;
$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setName('Candara');
$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setSize(20);
$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setBold(true);
-$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
-$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE);
+$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setUnderline(\PHPExcel\Style\Font::UNDERLINE_SINGLE);
+$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_WHITE);
-$objPHPExcel->getActiveSheet()->getStyle('D1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE);
-$objPHPExcel->getActiveSheet()->getStyle('E1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE);
+$objPHPExcel->getActiveSheet()->getStyle('D1')->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_WHITE);
+$objPHPExcel->getActiveSheet()->getStyle('E1')->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_WHITE);
$objPHPExcel->getActiveSheet()->getStyle('D13')->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->getStyle('E13')->getFont()->setBold(true);
// Set alignments
echo date('H:i:s') , " Set alignments" , EOL;
-$objPHPExcel->getActiveSheet()->getStyle('D11')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
-$objPHPExcel->getActiveSheet()->getStyle('D12')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
-$objPHPExcel->getActiveSheet()->getStyle('D13')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
+$objPHPExcel->getActiveSheet()->getStyle('D11')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_RIGHT);
+$objPHPExcel->getActiveSheet()->getStyle('D12')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_RIGHT);
+$objPHPExcel->getActiveSheet()->getStyle('D13')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_RIGHT);
-$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY);
-$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
+$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_JUSTIFY);
+$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setVertical(\PHPExcel\Style\Alignment::VERTICAL_CENTER);
$objPHPExcel->getActiveSheet()->getStyle('B5')->getAlignment()->setShrinkToFit(true);
@@ -178,7 +178,7 @@ echo date('H:i:s') , " Set thin black border outline around column" , EOL;
$styleThinBlackBorderOutline = array(
'borders' => array(
'outline' => array(
- 'style' => PHPExcel_Style_Border::BORDER_THIN,
+ 'style' => \PHPExcel\Style\Border::BORDER_THIN,
'color' => array('argb' => 'FF000000'),
),
),
@@ -191,7 +191,7 @@ echo date('H:i:s') , " Set thick brown border outline around Total" , EOL;
$styleThickBrownBorderOutline = array(
'borders' => array(
'outline' => array(
- 'style' => PHPExcel_Style_Border::BORDER_THICK,
+ 'style' => \PHPExcel\Style\Border::BORDER_THICK,
'color' => array('argb' => 'FF993300'),
),
),
@@ -200,7 +200,7 @@ $objPHPExcel->getActiveSheet()->getStyle('D13:E13')->applyFromArray($styleThickB
// Set fills
echo date('H:i:s') , " Set fills" , EOL;
-$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
+$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(\PHPExcel\Style\Fill::FILL_SOLID);
$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->getStartColor()->setARGB('FF808080');
// Set style for header row using alternative method
@@ -211,15 +211,15 @@ $objPHPExcel->getActiveSheet()->getStyle('A3:E3')->applyFromArray(
'bold' => true
),
'alignment' => array(
- 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT,
+ 'horizontal' => \PHPExcel\Style\Alignment::HORIZONTAL_RIGHT,
),
'borders' => array(
'top' => array(
- 'style' => PHPExcel_Style_Border::BORDER_THIN
+ 'style' => \PHPExcel\Style\Border::BORDER_THIN
)
),
'fill' => array(
- 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR,
+ 'type' => \PHPExcel\Style\Fill::FILL_GRADIENT_LINEAR,
'rotation' => 90,
'startcolor' => array(
'argb' => 'FFA0A0A0'
@@ -234,11 +234,11 @@ $objPHPExcel->getActiveSheet()->getStyle('A3:E3')->applyFromArray(
$objPHPExcel->getActiveSheet()->getStyle('A3')->applyFromArray(
array(
'alignment' => array(
- 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
+ 'horizontal' => \PHPExcel\Style\Alignment::HORIZONTAL_LEFT,
),
'borders' => array(
'left' => array(
- 'style' => PHPExcel_Style_Border::BORDER_THIN
+ 'style' => \PHPExcel\Style\Border::BORDER_THIN
)
)
)
@@ -247,7 +247,7 @@ $objPHPExcel->getActiveSheet()->getStyle('A3')->applyFromArray(
$objPHPExcel->getActiveSheet()->getStyle('B3')->applyFromArray(
array(
'alignment' => array(
- 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT,
+ 'horizontal' => \PHPExcel\Style\Alignment::HORIZONTAL_LEFT,
)
)
);
@@ -256,7 +256,7 @@ $objPHPExcel->getActiveSheet()->getStyle('E3')->applyFromArray(
array(
'borders' => array(
'right' => array(
- 'style' => PHPExcel_Style_Border::BORDER_THIN
+ 'style' => \PHPExcel\Style\Border::BORDER_THIN
)
)
)
@@ -264,24 +264,24 @@ $objPHPExcel->getActiveSheet()->getStyle('E3')->applyFromArray(
// Unprotect a cell
echo date('H:i:s') , " Unprotect a cell" , EOL;
-$objPHPExcel->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED);
+$objPHPExcel->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(\PHPExcel\Style\Protection::PROTECTION_UNPROTECTED);
// Add a hyperlink to the sheet
echo date('H:i:s') , " Add a hyperlink to an external website" , EOL;
$objPHPExcel->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net');
$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('http://www.phpexcel.net');
$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setTooltip('Navigate to website');
-$objPHPExcel->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
+$objPHPExcel->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_RIGHT);
echo date('H:i:s') , " Add a hyperlink to another cell on a different worksheet within the workbook" , EOL;
$objPHPExcel->getActiveSheet()->setCellValue('E27', 'Terms and conditions');
$objPHPExcel->getActiveSheet()->getCell('E27')->getHyperlink()->setUrl("sheet://'Terms and conditions'!A1");
$objPHPExcel->getActiveSheet()->getCell('E27')->getHyperlink()->setTooltip('Review terms and conditions');
-$objPHPExcel->getActiveSheet()->getStyle('E27')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
+$objPHPExcel->getActiveSheet()->getStyle('E27')->getAlignment()->setHorizontal(\PHPExcel\Style\Alignment::HORIZONTAL_RIGHT);
// Add a drawing to the worksheet
echo date('H:i:s') , " Add a drawing to the worksheet" , EOL;
-$objDrawing = new PHPExcel_Worksheet_Drawing();
+$objDrawing = new \PHPExcel\Worksheet\Drawing();
$objDrawing->setName('Logo');
$objDrawing->setDescription('Logo');
$objDrawing->setPath('./images/officelogo.jpg');
@@ -290,7 +290,7 @@ $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
// Add a drawing to the worksheet
echo date('H:i:s') , " Add a drawing to the worksheet" , EOL;
-$objDrawing = new PHPExcel_Worksheet_Drawing();
+$objDrawing = new \PHPExcel\Worksheet\Drawing();
$objDrawing->setName('Paid');
$objDrawing->setDescription('Paid');
$objDrawing->setPath('./images/paid.png');
@@ -303,7 +303,7 @@ $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
// Add a drawing to the worksheet
echo date('H:i:s') , " Add a drawing to the worksheet" , EOL;
-$objDrawing = new PHPExcel_Worksheet_Drawing();
+$objDrawing = new \PHPExcel\Worksheet\Drawing();
$objDrawing->setName('PHPExcel logo');
$objDrawing->setDescription('PHPExcel logo');
$objDrawing->setPath('./images/phpexcel_logo.gif');
@@ -326,8 +326,8 @@ $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHP
// Set page orientation and size
echo date('H:i:s') , " Set page orientation and size" , EOL;
-$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
-$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_PORTRAIT);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(\PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4);
// Rename first worksheet
echo date('H:i:s') , " Rename first worksheet" , EOL;
@@ -367,13 +367,13 @@ echo date('H:i:s') , " Set fonts" , EOL;
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setName('Candara');
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
-$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
+$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setUnderline(\PHPExcel\Style\Font::UNDERLINE_SINGLE);
$objPHPExcel->getActiveSheet()->getStyle('A3:A6')->getFont()->setSize(8);
// Add a drawing to the worksheet
echo date('H:i:s') , " Add a drawing to the worksheet" , EOL;
-$objDrawing = new PHPExcel_Worksheet_Drawing();
+$objDrawing = new \PHPExcel\Worksheet\Drawing();
$objDrawing->setName('Terms and conditions');
$objDrawing->setDescription('Terms and conditions');
$objDrawing->setPath('./images/termsconditions.jpg');
@@ -382,8 +382,8 @@ $objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
// Set page orientation and size
echo date('H:i:s') , " Set page orientation and size" , EOL;
-$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
-$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(\PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4);
// Rename second worksheet
echo date('H:i:s') , " Rename second worksheet" , EOL;
diff --git a/Examples/05featuredemo.php b/Examples/05featuredemo.php
index 9e502acb..e782bba1 100644
--- a/Examples/05featuredemo.php
+++ b/Examples/05featuredemo.php
@@ -36,15 +36,11 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
-
-
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -59,7 +55,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/06largescale-with-cellcaching-sqlite.php b/Examples/06largescale-with-cellcaching-sqlite.php
index 8baa7431..c162d37e 100644
--- a/Examples/06largescale-with-cellcaching-sqlite.php
+++ b/Examples/06largescale-with-cellcaching-sqlite.php
@@ -35,10 +35,10 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_sqlite;
-if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
+$cacheMethod = \PHPExcel\CachedObjectStorageFactory::CACHE_TO_SQLITE;
+if (\PHPExcel\Settings::setCacheStorageMethod($cacheMethod)) {
echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL;
} else {
echo date('H:i:s') , " Unable to set Cell Caching using " , $cacheMethod , " method, reverting to memory" , EOL;
@@ -47,7 +47,7 @@ if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set properties" , EOL;
@@ -110,7 +110,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/06largescale-with-cellcaching-sqlite3.php b/Examples/06largescale-with-cellcaching-sqlite3.php
index 1f480d1d..38a8e95d 100644
--- a/Examples/06largescale-with-cellcaching-sqlite3.php
+++ b/Examples/06largescale-with-cellcaching-sqlite3.php
@@ -35,10 +35,10 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_sqlite3;
-if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
+$cacheMethod = \PHPExcel\CachedObjectStorageFactory::CACHE_TO_SQLITE3;
+if (\PHPExcel\Settings::setCacheStorageMethod($cacheMethod)) {
echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL;
} else {
echo date('H:i:s') , " Unable to set Cell Caching using " , $cacheMethod , " method, reverting to memory" , EOL;
@@ -47,7 +47,7 @@ if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set properties" , EOL;
@@ -110,7 +110,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/06largescale-with-cellcaching.php b/Examples/06largescale-with-cellcaching.php
index d20b29f2..d7e745d4 100644
--- a/Examples/06largescale-with-cellcaching.php
+++ b/Examples/06largescale-with-cellcaching.php
@@ -35,10 +35,10 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip;
-if (!PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) {
+$cacheMethod = \PHPExcel\CachedObjectStorageFactory::CACHE_IN_MEMORY_GZIP;
+if (!\PHPExcel\Settings::setCacheStorageMethod($cacheMethod)) {
die($cacheMethod . " caching method is not available" . EOL);
}
echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL;
@@ -46,7 +46,7 @@ echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" ,
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set properties" , EOL;
@@ -109,7 +109,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/06largescale-xls.php b/Examples/06largescale-xls.php
index 5adc3d25..80233629 100644
--- a/Examples/06largescale-xls.php
+++ b/Examples/06largescale-xls.php
@@ -35,7 +35,7 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
/*
@@ -54,7 +54,7 @@ for writing to Excel2007:
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set properties" , EOL;
@@ -117,7 +117,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/06largescale.php b/Examples/06largescale.php
index cb21caf5..df7e051c 100644
--- a/Examples/06largescale.php
+++ b/Examples/06largescale.php
@@ -35,7 +35,7 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
/*
@@ -54,7 +54,7 @@ for writing to Excel2007:
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set properties" , EOL;
@@ -117,7 +117,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/07reader.php b/Examples/07reader.php
index 318ba189..756ecd52 100644
--- a/Examples/07reader.php
+++ b/Examples/07reader.php
@@ -33,8 +33,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("05featuredemo.xlsx")) {
@@ -44,7 +44,7 @@ if (!file_exists("05featuredemo.xlsx")) {
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx");
+$objPHPExcel = \PHPExcel\IOFactory::load("05featuredemo.xlsx");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -56,7 +56,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
diff --git a/Examples/07readerPCLZip.php b/Examples/07readerPCLZip.php
index f1da9c57..f5027397 100644
--- a/Examples/07readerPCLZip.php
+++ b/Examples/07readerPCLZip.php
@@ -33,8 +33,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("05featuredemo.xlsx")) {
@@ -42,12 +42,12 @@ if (!file_exists("05featuredemo.xlsx")) {
}
// Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file
-PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
+\PHPExcel\Settings::setZipClass(\PHPExcel\Settings::PCLZIP);
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx");
+$objPHPExcel = \PHPExcel\IOFactory::load("05featuredemo.xlsx");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -59,7 +59,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
diff --git a/Examples/08conditionalformatting.php b/Examples/08conditionalformatting.php
index 514a8bb6..92d58945 100644
--- a/Examples/08conditionalformatting.php
+++ b/Examples/08conditionalformatting.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -86,30 +86,30 @@ $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(12);
// Add conditional formatting
echo date('H:i:s') , " Add conditional formatting" , EOL;
-$objConditional1 = new PHPExcel_Style_Conditional();
-$objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
- ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_BETWEEN)
+$objConditional1 = new \PHPExcel\Style\Conditional();
+$objConditional1->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
+ ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_BETWEEN)
->addCondition('200')
->addCondition('400');
-$objConditional1->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_YELLOW);
+$objConditional1->getStyle()->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_YELLOW);
$objConditional1->getStyle()->getFont()->setBold(true);
-$objConditional1->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
+$objConditional1->getStyle()->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
-$objConditional2 = new PHPExcel_Style_Conditional();
-$objConditional2->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
- ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_LESSTHAN)
+$objConditional2 = new \PHPExcel\Style\Conditional();
+$objConditional2->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
+ ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_LESSTHAN)
->addCondition('0');
-$objConditional2->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED);
+$objConditional2->getStyle()->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_RED);
$objConditional2->getStyle()->getFont()->setItalic(true);
-$objConditional2->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
+$objConditional2->getStyle()->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
-$objConditional3 = new PHPExcel_Style_Conditional();
-$objConditional3->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
- ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL)
+$objConditional3 = new \PHPExcel\Style\Conditional();
+$objConditional3->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
+ ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_GREATERTHANOREQUAL)
->addCondition('0');
-$objConditional3->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_GREEN);
+$objConditional3->getStyle()->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_GREEN);
$objConditional3->getStyle()->getFont()->setItalic(true);
-$objConditional3->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
+$objConditional3->getStyle()->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE);
$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('B2')->getConditionalStyles();
array_push($conditionalStyles, $objConditional1);
@@ -142,8 +142,8 @@ $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHP
// Set page orientation and size
echo date('H:i:s') , " Set page orientation and size" , EOL;
-$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
-$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_PORTRAIT);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(\PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4);
// Rename worksheet
@@ -159,7 +159,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -170,7 +170,7 @@ echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds"
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/08conditionalformatting2.php b/Examples/08conditionalformatting2.php
index aeb2a313..597a46d7 100644
--- a/Examples/08conditionalformatting2.php
+++ b/Examples/08conditionalformatting2.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -70,23 +70,23 @@ $objPHPExcel->getActiveSheet()
$objPHPExcel->getActiveSheet()->getStyle('A1:A8')
->getNumberFormat()
->setFormatCode(
- PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00
+ \PHPExcel\Style\NumberFormat::FORMAT_PERCENTAGE_00
);
// Add conditional formatting
echo date('H:i:s') , " Add conditional formatting" , EOL;
-$objConditional1 = new PHPExcel_Style_Conditional();
-$objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
- ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_LESSTHAN)
+$objConditional1 = new \PHPExcel\Style\Conditional();
+$objConditional1->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
+ ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_LESSTHAN)
->addCondition('0');
-$objConditional1->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED);
+$objConditional1->getStyle()->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_RED);
-$objConditional3 = new PHPExcel_Style_Conditional();
-$objConditional3->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS)
- ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL)
+$objConditional3 = new \PHPExcel\Style\Conditional();
+$objConditional3->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
+ ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_GREATERTHANOREQUAL)
->addCondition('1');
-$objConditional3->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_GREEN);
+$objConditional3->getStyle()->getFont()->getColor()->setARGB(\PHPExcel\Style\Color::COLOR_GREEN);
$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles();
array_push($conditionalStyles, $objConditional1);
@@ -106,7 +106,7 @@ $objPHPExcel->getActiveSheet()->duplicateConditionalStyle(
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -117,7 +117,7 @@ echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds"
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/09pagebreaks.php b/Examples/09pagebreaks.php
index 36e21ae4..783c7b1d 100644
--- a/Examples/09pagebreaks.php
+++ b/Examples/09pagebreaks.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -74,7 +74,7 @@ for ($i = 2; $i <= 50; $i++) {
// Add page breaks every 10 rows
if ($i % 10 == 0) {
// Add a page break
- $objPHPExcel->getActiveSheet()->setBreak( 'A' . $i, PHPExcel_Worksheet::BREAK_ROW );
+ $objPHPExcel->getActiveSheet()->setBreak( 'A' . $i, \PHPExcel\Worksheet::BREAK_ROW );
}
}
@@ -100,7 +100,7 @@ $objPHPExcel->getActiveSheet()
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -115,7 +115,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/10autofilter-selection-1.php b/Examples/10autofilter-selection-1.php
index 8cdc0def..36882d80 100644
--- a/Examples/10autofilter-selection-1.php
+++ b/Examples/10autofilter-selection-1.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s').' Create new PHPExcel object'.EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s').' Set document properties'.EOL;
@@ -77,7 +77,7 @@ foreach($years as $year) {
foreach($countries as $country) {
$endDays = date('t',mktime(0,0,0,$period,1,$year));
for($i = 1; $i <= $endDays; ++$i) {
- $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel(
+ $eDate = \PHPExcel\Shared\Date::FormattedPHPToExcel(
$year,
$period,
$i
@@ -116,8 +116,8 @@ $objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2);
-$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
+$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$objPHPExcel->getActiveSheet()->freezePane('A2');
@@ -136,45 +136,45 @@ echo date('H:i:s').' Set active filters'.EOL;
// Filter the Country column on a filter value of countries beginning with the letter U (or Japan)
// We use * as a wildcard, so specify as U* and using a wildcard requires customFilter
$autoFilter->getColumn('C')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'u*'
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
$autoFilter->getColumn('C')
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'japan'
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
// Filter the Date column on a filter value of the first day of every period of the current year
// We us a dateGroup ruletype for this, although it is still a standard filter
foreach($periods as $period) {
$endDate = date('t',mktime(0,0,0,$period,1,$currentYear));
$autoFilter->getColumn('D')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
array(
'year' => $currentYear,
'month' => $period,
'day' => $endDate
)
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP);
}
// Display only sales values that are blank
// Standard filter, operator equals, and value of NULL
$autoFilter->getColumn('E')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
''
);
@@ -187,7 +187,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -202,7 +202,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/10autofilter-selection-2.php b/Examples/10autofilter-selection-2.php
index e2aea748..8cd6d121 100644
--- a/Examples/10autofilter-selection-2.php
+++ b/Examples/10autofilter-selection-2.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s').' Create new PHPExcel object'.EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s').' Set document properties'.EOL;
@@ -59,8 +59,7 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', 'Financial Year')
->setCellValue('C1', 'Country')
->setCellValue('D1', 'Date')
->setCellValue('E1', 'Sales Value')
- ->setCellValue('F1', 'Expenditure')
- ;
+ ->setCellValue('F1', 'Expenditure');
$startYear = $endYear = $currentYear = date('Y');
$startYear--;
$endYear++;
@@ -77,7 +76,7 @@ foreach($years as $year) {
foreach($countries as $country) {
$endDays = date('t',mktime(0,0,0,$period,1,$year));
for($i = 1; $i <= $endDays; ++$i) {
- $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel(
+ $eDate = \PHPExcel\Shared\Date::FormattedPHPToExcel(
$year,
$period,
$i
@@ -116,8 +115,8 @@ $objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2);
-$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
+$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$objPHPExcel->getActiveSheet()->freezePane('A2');
@@ -136,39 +135,39 @@ echo date('H:i:s').' Set active filters'.EOL;
// Filter the Country column on a filter value of Germany
// As it's just a simple value filter, we can use FILTERTYPE_FILTER
$autoFilter->getColumn('C')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'Germany'
);
// Filter the Date column on a filter value of the year to date
$autoFilter->getColumn('D')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
NULL,
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER);
// Display only sales values that are between 400 and 600
$autoFilter->getColumn('E')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL,
400
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
$autoFilter->getColumn('E')
- ->setJoin(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND)
+ ->setJoin(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL,
600
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
// Set active sheet index to the first sheet, so Excel opens this as the first sheet
@@ -179,7 +178,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -194,7 +193,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/10autofilter-selection-display.php b/Examples/10autofilter-selection-display.php
index ba3fed9e..7fb9b7f6 100644
--- a/Examples/10autofilter-selection-display.php
+++ b/Examples/10autofilter-selection-display.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s').' Create new PHPExcel object'.EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s').' Set document properties'.EOL;
@@ -77,7 +77,7 @@ foreach($years as $year) {
foreach($countries as $country) {
$endDays = date('t',mktime(0,0,0,$period,1,$year));
for($i = 1; $i <= $endDays; ++$i) {
- $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel(
+ $eDate = \PHPExcel\Shared\Date::FormattedPHPToExcel(
$year,
$period,
$i
@@ -116,8 +116,8 @@ $objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5);
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5);
-$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2);
-$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
+$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_YYYYMMDD2);
+$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14);
$objPHPExcel->getActiveSheet()->freezePane('A2');
@@ -136,45 +136,45 @@ echo date('H:i:s').' Set active filters'.EOL;
// Filter the Country column on a filter value of countries beginning with the letter U (or Japan)
// We use * as a wildcard, so specify as U* and using a wildcard requires customFilter
$autoFilter->getColumn('C')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'u*'
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
$autoFilter->getColumn('C')
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
'japan'
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
// Filter the Date column on a filter value of the first day of every period of the current year
// We us a dateGroup ruletype for this, although it is still a standard filter
foreach($periods as $period) {
$endDate = date('t',mktime(0,0,0,$period,1,$currentYear));
$autoFilter->getColumn('D')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
array(
'year' => $currentYear,
'month' => $period,
'day' => $endDate
)
)
- ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP);
+ ->setRuleType(\PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP);
}
// Display only sales values that are blank
// Standard filter, operator equals, and value of NULL
$autoFilter->getColumn('E')
- ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER)
+ ->setFilterType(\PHPExcel\Worksheet\AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER)
->createRule()
->setRule(
- PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
+ \PHPExcel\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL,
''
);
diff --git a/Examples/10autofilter.php b/Examples/10autofilter.php
index 015e9cfe..9dad0be1 100644
--- a/Examples/10autofilter.php
+++ b/Examples/10autofilter.php
@@ -35,11 +35,11 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s').' Create new PHPExcel object'.EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s').' Set document properties'.EOL;
@@ -137,7 +137,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -152,7 +152,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/11documentsecurity-xls.php b/Examples/11documentsecurity-xls.php
index 2348ce95..bb1dfa83 100644
--- a/Examples/11documentsecurity-xls.php
+++ b/Examples/11documentsecurity-xls.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -90,7 +90,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/11documentsecurity.php b/Examples/11documentsecurity.php
index 9fd4fb2a..618c92d7 100644
--- a/Examples/11documentsecurity.php
+++ b/Examples/11documentsecurity.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -90,7 +90,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/12cellProtection.php b/Examples/12cellProtection.php
index e12c9ae4..c266c042 100644
--- a/Examples/12cellProtection.php
+++ b/Examples/12cellProtection.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -76,7 +76,7 @@ $objPHPExcel->getActiveSheet()->getProtection()->setSheet(true);
$objPHPExcel->getActiveSheet()
->getStyle('A2:B2')
->getProtection()->setLocked(
- PHPExcel_Style_Protection::PROTECTION_UNPROTECTED
+ \PHPExcel\Style\Protection::PROTECTION_UNPROTECTED
);
@@ -88,7 +88,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/13calculation.php b/Examples/13calculation.php
index e255d115..a3b34281 100644
--- a/Examples/13calculation.php
+++ b/Examples/13calculation.php
@@ -37,17 +37,17 @@ date_default_timezone_set('Europe/London');
mt_srand(1234567890);
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// List functions
echo date('H:i:s') , " List implemented functions" , EOL;
-$objCalc = PHPExcel_Calculation::getInstance();
+$objCalc = \PHPExcel\Calculation::getInstance();
print_r($objCalc->listFunctionNames());
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Add some data, we will use some formulas here
echo date('H:i:s') , " Add some data and formulas" , EOL;
@@ -207,7 +207,7 @@ for ($col = 'B'; $col != 'G'; ++$col) {
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
//
// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the
diff --git a/Examples/13calculationCyclicFormulae.php b/Examples/13calculationCyclicFormulae.php
index 8512a3e8..b553efeb 100644
--- a/Examples/13calculationCyclicFormulae.php
+++ b/Examples/13calculationCyclicFormulae.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Add some data, we will use some formulas here
echo date('H:i:s') , " Add some data and formulas" , EOL;
@@ -50,7 +50,7 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', '=B1')
->setCellValue('B1', '=A1+1')
->setCellValue('B2', '=A2');
-PHPExcel_Calculation::getInstance($objPHPExcel)->cyclicFormulaCount = 100;
+\PHPExcel\Calculation::getInstance($objPHPExcel)->cyclicFormulaCount = 100;
// Calculated data
echo date('H:i:s') , " Calculated data" , EOL;
@@ -69,7 +69,7 @@ for($row = 1; $row <= 2; ++$row) {
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
//
// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the
diff --git a/Examples/14excel5.php b/Examples/14excel5.php
index 7a9f6856..b35a2aae 100644
--- a/Examples/14excel5.php
+++ b/Examples/14excel5.php
@@ -36,15 +36,15 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Save Excel 95 file
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/15datavalidation-xls.php b/Examples/15datavalidation-xls.php
index 22ed6265..d3a7fd8a 100644
--- a/Examples/15datavalidation-xls.php
+++ b/Examples/15datavalidation-xls.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
@@ -76,8 +76,8 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data
// Set data validation
echo date('H:i:s') , " Set data validation" , EOL;
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B3')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_WHOLE );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_WHOLE );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_STOP );
$objValidation->setAllowBlank(true);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -89,8 +89,8 @@ $objValidation->setFormula1(10);
$objValidation->setFormula2(20);
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
$objValidation->setAllowBlank(false);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -102,8 +102,8 @@ $objValidation->setPrompt('Please pick a value from the drop-down list.');
$objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the list items between " and " !!!
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
$objValidation->setAllowBlank(false);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -123,7 +123,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/15datavalidation.php b/Examples/15datavalidation.php
index e6688c5f..3c41387b 100644
--- a/Examples/15datavalidation.php
+++ b/Examples/15datavalidation.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
@@ -76,8 +76,8 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data
// Set data validation
echo date('H:i:s') , " Set data validation" , EOL;
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B3')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_WHOLE );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_WHOLE );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_STOP );
$objValidation->setAllowBlank(true);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -89,8 +89,8 @@ $objValidation->setFormula1(10);
$objValidation->setFormula2(20);
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
$objValidation->setAllowBlank(false);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -103,8 +103,8 @@ $objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the l
$objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST );
-$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION );
+$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
+$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
$objValidation->setAllowBlank(false);
$objValidation->setShowInputMessage(true);
$objValidation->setShowErrorMessage(true);
@@ -124,7 +124,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/16csv.php b/Examples/16csv.php
index 8d42fcbb..f6bea48c 100644
--- a/Examples/16csv.php
+++ b/Examples/16csv.php
@@ -37,14 +37,14 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** PHPExcel_IOFactory */
-require_once '../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
echo date('H:i:s') , " Write to CSV format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV')->setDelimiter(',')
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'CSV')->setDelimiter(',')
->setEnclosure('"')
->setSheetIndex(0)
->save(str_replace('.php', '.csv', __FILE__));
@@ -58,7 +58,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Read from CSV format" , EOL;
$callStartTime = microtime(true);
-$objReader = PHPExcel_IOFactory::createReader('CSV')->setDelimiter(',')
+$objReader = \PHPExcel\IOFactory::createReader('CSV')->setDelimiter(',')
->setEnclosure('"')
->setSheetIndex(0);
$objPHPExcelFromCSV = $objReader->load(str_replace('.php', '.csv', __FILE__));
@@ -73,7 +73,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter2007 = PHPExcel_IOFactory::createWriter($objPHPExcelFromCSV, 'Excel2007');
+$objWriter2007 = \PHPExcel\IOFactory::createWriter($objPHPExcelFromCSV, 'Excel2007');
$objWriter2007->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -86,7 +86,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to CSV format" , EOL;
$callStartTime = microtime(true);
-$objWriterCSV = PHPExcel_IOFactory::createWriter($objPHPExcelFromCSV, 'CSV');
+$objWriterCSV = \PHPExcel\IOFactory::createWriter($objPHPExcelFromCSV, 'CSV');
$objWriterCSV->setExcelCompatibility(true);
$objWriterCSV->save(str_replace('.php', '_excel.csv', __FILE__));
$callEndTime = microtime(true);
diff --git a/Examples/17html.php b/Examples/17html.php
index b84f8d4e..322848fa 100644
--- a/Examples/17html.php
+++ b/Examples/17html.php
@@ -37,14 +37,14 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
echo date('H:i:s') , " Write to HTML format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
$objWriter->setSheetIndex(0);
//$objWriter->setImagesRoot('http://www.example.com');
$objWriter->save(str_replace('.php', '.htm', __FILE__));
diff --git a/Examples/18extendedcalculation.php b/Examples/18extendedcalculation.php
index 59aeb300..3edfd0e6 100644
--- a/Examples/18extendedcalculation.php
+++ b/Examples/18extendedcalculation.php
@@ -36,17 +36,17 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// List functions
echo date('H:i:s') . " List implemented functions\n";
-$objCalc = PHPExcel_Calculation::getInstance();
+$objCalc = \PHPExcel\Calculation::getInstance();
print_r($objCalc->listFunctionNames());
// Create new PHPExcel object
echo date('H:i:s') . " Create new PHPExcel object\n";
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Add some data, we will use some formulas here
echo date('H:i:s') . " Add some data\n";
diff --git a/Examples/19namedrange.php b/Examples/19namedrange.php
index 7876ea58..01d0d524 100644
--- a/Examples/19namedrange.php
+++ b/Examples/19namedrange.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -66,8 +66,8 @@ $objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:')
// Define named ranges
echo date('H:i:s') , " Define named ranges" , EOL;
-$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonName', $objPHPExcel->getActiveSheet(), 'B1') );
-$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonLN', $objPHPExcel->getActiveSheet(), 'B2') );
+$objPHPExcel->addNamedRange( new \PHPExcel\NamedRange('PersonName', $objPHPExcel->getActiveSheet(), 'B1') );
+$objPHPExcel->addNamedRange( new \PHPExcel\NamedRange('PersonLN', $objPHPExcel->getActiveSheet(), 'B2') );
// Rename named ranges
echo date('H:i:s') , " Rename named ranges" , EOL;
@@ -110,7 +110,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/20readexcel5.php b/Examples/20readexcel5.php
index 7625c7b8..b6ba2c1f 100644
--- a/Examples/20readexcel5.php
+++ b/Examples/20readexcel5.php
@@ -35,8 +35,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("14excel5.xls")) {
@@ -46,7 +46,7 @@ if (!file_exists("14excel5.xls")) {
echo date('H:i:s') , " Load workbook from Excel5 file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel = PHPExcel_IOFactory::load("14excel5.xls");
+$objPHPExcel = \PHPExcel\IOFactory::load("14excel5.xls");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -60,7 +60,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/21pdf.php b/Examples/21pdf.php
index b26ddb8b..180b2cb9 100644
--- a/Examples/21pdf.php
+++ b/Examples/21pdf.php
@@ -37,15 +37,15 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the Rendering library that you wish to use
// and its directory location on your server
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF;
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
-$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
+//$rendererName = \PHPExcel\Settings::PDF_RENDERER_TCPDF;
+//$rendererName = \PHPExcel\Settings::PDF_RENDERER_MPDF;
+$rendererName = \PHPExcel\Settings::PDF_RENDERER_DOMPDF;
//$rendererLibrary = 'tcPDF5.9';
//$rendererLibrary = 'mPDF5.4';
$rendererLibrary = 'domPDF0.6.0beta3';
@@ -56,12 +56,12 @@ echo date('H:i:s') , " Hide grid lines" , EOL;
$objPHPExcel->getActiveSheet()->setShowGridLines(false);
echo date('H:i:s') , " Set orientation to landscape" , EOL;
-$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
+$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
echo date('H:i:s') , " Write to PDF format using {$rendererName}" , EOL;
-if (!PHPExcel_Settings::setPdfRenderer(
+if (!\PHPExcel\Settings::setPdfRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -75,7 +75,7 @@ if (!PHPExcel_Settings::setPdfRenderer(
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
$objWriter->setSheetIndex(0);
$objWriter->save(str_replace('.php', '_'.$rendererName.'.pdf', __FILE__));
$callEndTime = microtime(true);
diff --git a/Examples/22heavilyformatted.php b/Examples/22heavilyformatted.php
index 98c7d184..c97731a0 100644
--- a/Examples/22heavilyformatted.php
+++ b/Examples/22heavilyformatted.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -60,19 +60,19 @@ $objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->getStyle('A1:T100')->applyFromArray(
array('fill' => array(
- 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'type' => \PHPExcel\Style\Fill::FILL_SOLID,
'color' => array('argb' => 'FFCCFFCC')
),
'borders' => array(
- 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
- 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
+ 'bottom' => array('style' => \PHPExcel\Style\Border::BORDER_THIN),
+ 'right' => array('style' => \PHPExcel\Style\Border::BORDER_MEDIUM)
)
)
);
$objPHPExcel->getActiveSheet()->getStyle('C5:R95')->applyFromArray(
array('fill' => array(
- 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'type' => \PHPExcel\Style\Fill::FILL_SOLID,
'color' => array('argb' => 'FFFFFF00')
),
)
@@ -82,7 +82,7 @@ $objPHPExcel->getActiveSheet()->getStyle('C5:R95')->applyFromArray(
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -97,7 +97,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/23sharedstyles.php b/Examples/23sharedstyles.php
index 22eadba1..a60c68dd 100644
--- a/Examples/23sharedstyles.php
+++ b/Examples/23sharedstyles.php
@@ -36,12 +36,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -58,39 +58,39 @@ $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
echo date('H:i:s') , " Add some data" , EOL;
$objPHPExcel->setActiveSheetIndex(0);
-$sharedStyle1 = new PHPExcel_Style();
-$sharedStyle2 = new PHPExcel_Style();
+$sharedStyle1 = new \PHPExcel\Style();
+$sharedStyle2 = new \PHPExcel\Style();
$sharedStyle1->applyFromArray(
array('fill' => array(
- 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'type' => \PHPExcel\Style\Fill::FILL_SOLID,
'color' => array('argb' => 'FFCCFFCC')
),
'borders' => array(
- 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
- 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
+ 'bottom' => array('style' => \PHPExcel\Style\Border::BORDER_THIN),
+ 'right' => array('style' => \PHPExcel\Style\Border::BORDER_MEDIUM)
)
));
$sharedStyle2->applyFromArray(
array('fill' => array(
- 'type' => PHPExcel_Style_Fill::FILL_SOLID,
+ 'type' => \PHPExcel\Style\Fill::FILL_SOLID,
'color' => array('argb' => 'FFFFFF00')
),
'borders' => array(
- 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
- 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
+ 'bottom' => array('style' => \PHPExcel\Style\Border::BORDER_THIN),
+ 'right' => array('style' => \PHPExcel\Style\Border::BORDER_MEDIUM)
)
));
-$objPHPExcel->getActiveSheet()->setSharedStyle($sharedStyle1, "A1:T100");
-$objPHPExcel->getActiveSheet()->setSharedStyle($sharedStyle2, "C5:R95");
+$objPHPExcel->getActiveSheet()->duplicateStyle($sharedStyle1, "A1:T100");
+$objPHPExcel->getActiveSheet()->duplicateStyle($sharedStyle2, "C5:R95");
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -105,7 +105,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/24readfilter.php b/Examples/24readfilter.php
index 000d180a..91c11ced 100644
--- a/Examples/24readfilter.php
+++ b/Examples/24readfilter.php
@@ -33,8 +33,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Check prerequisites
@@ -42,7 +42,7 @@ if (!file_exists("06largescale.xlsx")) {
exit("Please run 06largescale.php first.\n");
}
-class MyReadFilter implements PHPExcel_Reader_IReadFilter
+class MyReadFilter implements \PHPExcel\Reader\IReadFilter
{
public function readCell($column, $row, $worksheetName = '') {
// Read title row and rows 20 - 30
@@ -56,7 +56,7 @@ class MyReadFilter implements PHPExcel_Reader_IReadFilter
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
-$objReader = PHPExcel_IOFactory::createReader('Excel2007');
+$objReader = \PHPExcel\IOFactory::createReader('Excel2007');
$objReader->setReadFilter( new MyReadFilter() );
$objPHPExcel = $objReader->load("06largescale.xlsx");
@@ -64,7 +64,7 @@ echo date('H:i:s') , " Remove unnecessary rows" , EOL;
$objPHPExcel->getActiveSheet()->removeRow(2, 18);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/25inmemoryimage.php b/Examples/25inmemoryimage.php
index 6c3b0b84..b170c3db 100644
--- a/Examples/25inmemoryimage.php
+++ b/Examples/25inmemoryimage.php
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -60,23 +60,23 @@ imagestring($gdImage, 1, 5, 5, 'Created with PHPExcel', $textColor);
// Add a drawing to the worksheet
echo date('H:i:s') , " Add a drawing to the worksheet" , EOL;
-$objDrawing = new PHPExcel_Worksheet_MemoryDrawing();
+$objDrawing = new \PHPExcel\Worksheet\MemoryDrawing();
$objDrawing->setName('Sample image');
$objDrawing->setDescription('Sample image');
$objDrawing->setImageResource($gdImage);
-$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
-$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
+$objDrawing->setRenderingFunction(\PHPExcel\Worksheet\MemoryDrawing::RENDERING_JPEG);
+$objDrawing->setMimeType(\PHPExcel\Worksheet\MemoryDrawing::MIMETYPE_DEFAULT);
$objDrawing->setHeight(36);
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
echo date('H:i:s') , " Write to HTML format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
$objWriter->save(str_replace('.php', '.html', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.html', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/26utf8.php b/Examples/26utf8.php
index 112c5c73..7c374062 100644
--- a/Examples/26utf8.php
+++ b/Examples/26utf8.php
@@ -35,14 +35,14 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the PDF Rendering library that you wish to use
// and its directory location on your server
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF;
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
-$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
+//$rendererName = \PHPExcel\Settings::PDF_RENDERER_TCPDF;
+//$rendererName = \PHPExcel\Settings::PDF_RENDERER_MPDF;
+$rendererName = \PHPExcel\Settings::PDF_RENDERER_DOMPDF;
//$rendererLibrary = 'tcPDF5.9';
//$rendererLibrary = 'mPDF5.4';
$rendererLibrary = 'domPDF0.6.0beta3';
@@ -51,33 +51,33 @@ $rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary;
// Read from Excel2007 (.xlsx) template
echo date('H:i:s') , " Load Excel2007 template file" , EOL;
-$objReader = PHPExcel_IOFactory::createReader('Excel2007');
+$objReader = \PHPExcel\IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("templates/26template.xlsx");
/** at this point, we could do some manipulations with the template, but we skip this step */
// Export to Excel2007 (.xlsx)
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Export to Excel5 (.xls)
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Export to HTML (.html)
echo date('H:i:s') , " Write to HTML format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
$objWriter->save(str_replace('.php', '.htm', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.htm', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Export to PDF (.pdf)
echo date('H:i:s') , " Write to PDF format" , EOL;
try {
- if (!PHPExcel_Settings::setPdfRenderer(
+ if (!\PHPExcel\Settings::setPdfRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -88,7 +88,7 @@ try {
EOL
);
} else {
- $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');
+ $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
$objWriter->save(str_replace('.php', '.pdf', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.pdf', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
}
@@ -103,7 +103,7 @@ $objWorksheet->removeRow(1, 2);
// Export to CSV (.csv)
echo date('H:i:s') , " Write to CSV format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'CSV');
$objWriter->save(str_replace('.php', '.csv', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.csv', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/27imagesexcel5.php b/Examples/27imagesexcel5.php
index a4f6a9d7..464812c1 100644
--- a/Examples/27imagesexcel5.php
+++ b/Examples/27imagesexcel5.php
@@ -35,23 +35,23 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Read from Excel5 (.xls) template
echo date('H:i:s') , " Load Excel2007 template file" , EOL;
-$objReader = PHPExcel_IOFactory::createReader('Excel5');
+$objReader = \PHPExcel\IOFactory::createReader('Excel5');
$objPHPExcel = $objReader->load("templates/27template.xls");
// Export to Excel2007 (.xlsx)
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Export to Excel5 (.xls)
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/28iterator.php b/Examples/28iterator.php
index 92c4192a..3267c35e 100644
--- a/Examples/28iterator.php
+++ b/Examples/28iterator.php
@@ -34,16 +34,15 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
-
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("05featuredemo.xlsx")) {
exit("Please run 05featuredemo.php first." . EOL);
}
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
-$objReader = PHPExcel_IOFactory::createReader('Excel2007');
+$objReader = \PHPExcel\IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load("05featuredemo.xlsx");
echo date('H:i:s') , " Iterate worksheets" , EOL;
diff --git a/Examples/29advancedvaluebinder.php b/Examples/29advancedvaluebinder.php
index a172c6cd..77becc6e 100644
--- a/Examples/29advancedvaluebinder.php
+++ b/Examples/29advancedvaluebinder.php
@@ -33,7 +33,7 @@ ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Set timezone
@@ -42,11 +42,11 @@ date_default_timezone_set('UTC');
// Set value binder
echo date('H:i:s') , " Set value binder" , EOL;
-PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() );
+\PHPExcel\Cell::setValueBinder( new \PHPExcel\Cell\AdvancedValueBinder() );
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -165,12 +165,12 @@ $objPHPExcel->setActiveSheetIndex(0);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Save Excel5 file
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/30template.php b/Examples/30template.php
index db9cbb45..38e039e8 100644
--- a/Examples/30template.php
+++ b/Examples/30template.php
@@ -34,13 +34,13 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
echo date('H:i:s') , " Load from Excel5 template" , EOL;
-$objReader = PHPExcel_IOFactory::createReader('Excel5');
+$objReader = \PHPExcel\IOFactory::createReader('Excel5');
$objPHPExcel = $objReader->load("templates/30template.xls");
@@ -61,7 +61,7 @@ $data = array(array('title' => 'Excel for dummies',
)
);
-$objPHPExcel->getActiveSheet()->setCellValue('D1', PHPExcel_Shared_Date::PHPToExcel(time()));
+$objPHPExcel->getActiveSheet()->setCellValue('D1', \PHPExcel\Shared\Date::PHPToExcel(time()));
$baseRow = 5;
foreach($data as $r => $dataRow) {
@@ -78,7 +78,7 @@ $objPHPExcel->getActiveSheet()->removeRow($baseRow-1,1);
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/31docproperties_write-xls.php b/Examples/31docproperties_write-xls.php
index e9a5e876..18c3d540 100644
--- a/Examples/31docproperties_write-xls.php
+++ b/Examples/31docproperties_write-xls.php
@@ -35,7 +35,7 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
$inputFileType = 'Excel5';
@@ -45,7 +45,7 @@ $inputFileName = 'templates/31docproperties.xls';
echo date('H:i:s') , " Load Tests from $inputFileType file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType);
+$objPHPExcelReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
$callEndTime = microtime(true);
@@ -64,7 +64,7 @@ $objPHPExcel->getProperties()->setTitle("Office 95 XLS Test Document")
// Save Excel 95 file
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
@@ -76,7 +76,7 @@ echo date('H:i:s') , " Peak memory usage: " . (memory_get_peak_usage(true) / 102
echo EOL;
// Reread File
echo date('H:i:s') , " Reread Excel5 file" , EOL;
-$objPHPExcelRead = PHPExcel_IOFactory::load(str_replace('.php', '.xls', __FILE__));
+$objPHPExcelRead = \PHPExcel\IOFactory::load(str_replace('.php', '.xls', __FILE__));
// Set properties
echo date('H:i:s') , " Get properties" , EOL;
@@ -106,9 +106,9 @@ foreach($customProperties as $customProperty) {
$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty);
$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty);
echo ' ' , $customProperty , ' - (' , $propertyType , ') - ';
- if ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE) {
+ if ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE) {
echo date('d-M-Y H:i:s',$propertyValue) , EOL;
- } elseif ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN) {
+ } elseif ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN) {
echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL;
} else {
echo $propertyValue , EOL;
diff --git a/Examples/31docproperties_write.php b/Examples/31docproperties_write.php
index 4cd47795..094f1611 100644
--- a/Examples/31docproperties_write.php
+++ b/Examples/31docproperties_write.php
@@ -35,7 +35,7 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
$inputFileType = 'Excel2007';
@@ -45,7 +45,7 @@ $inputFileName = 'templates/31docproperties.xlsx';
echo date('H:i:s') , " Load Tests from $inputFileType file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType);
+$objPHPExcelReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objPHPExcel = $objPHPExcelReader->load($inputFileName);
$callEndTime = microtime(true);
@@ -64,7 +64,7 @@ $objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document")
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
@@ -76,7 +76,7 @@ echo date('H:i:s') , " Peak memory usage: " . (memory_get_peak_usage(true) / 102
echo EOL;
// Reread File
echo date('H:i:s') , " Reread Excel2007 file" , EOL;
-$objPHPExcelRead = PHPExcel_IOFactory::load(str_replace('.php', '.xlsx', __FILE__));
+$objPHPExcelRead = \PHPExcel\IOFactory::load(str_replace('.php', '.xlsx', __FILE__));
// Set properties
echo date('H:i:s') , " Get properties" , EOL;
@@ -106,9 +106,9 @@ foreach($customProperties as $customProperty) {
$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty);
$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty);
echo ' ' , $customProperty , ' - (' , $propertyType , ') - ';
- if ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE) {
+ if ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_DATE) {
echo date('d-M-Y H:i:s',$propertyValue) , EOL;
- } elseif ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN) {
+ } elseif ($propertyType == \PHPExcel\Document\Properties::PROPERTY_TYPE_BOOLEAN) {
echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL;
} else {
echo $propertyValue , EOL;
diff --git a/Examples/32chartreadwrite.php b/Examples/32chartreadwrite.php
index 5aeedcae..97a72a9d 100644
--- a/Examples/32chartreadwrite.php
+++ b/Examples/32chartreadwrite.php
@@ -10,37 +10,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/**
- * PHPExcel
- *
- * Copyright (c) 2006 - 2015 PHPExcel
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * @category PHPExcel
- * @package PHPExcel
- * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
- * @version ##VERSION##, ##DATE##
- */
-
-/** Include path **/
-set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/');
-
-/** PHPExcel_IOFactory */
-include 'PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
$inputFileType = 'Excel2007';
$inputFileNames = 'templates/32readwrite*[0-9].xlsx';
@@ -63,7 +34,7 @@ foreach($inputFileNames as $inputFileName) {
echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
- $objReader = PHPExcel_IOFactory::createReader($inputFileType);
+ $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load($inputFileName);
@@ -114,7 +85,7 @@ foreach($inputFileNames as $inputFileName) {
$outputFileName = basename($inputFileName);
echo date('H:i:s') , " Write Tests to Excel2007 file " , EOL;
- $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+ $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save($outputFileName);
echo date('H:i:s') , " File written to " , $outputFileName , EOL;
diff --git a/Examples/33chartcreate-area.php b/Examples/33chartcreate-area.php
index fac8ce93..394c2ada 100644
--- a/Examples/33chartcreate-area.php
+++ b/Examples/33chartcreate-area.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,9 +60,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -72,7 +72,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -82,15 +82,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_AREACHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -98,16 +98,16 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_TOPRIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test %age-Stacked Area Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test %age-Stacked Area Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -128,7 +128,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-bar-stacked.php b/Examples/33chartcreate-bar-stacked.php
index af9493f7..0df7e339 100644
--- a/Examples/33chartcreate-bar-stacked.php
+++ b/Examples/33chartcreate-bar-stacked.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,9 +60,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -72,7 +72,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -82,15 +82,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STACKED, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STACKED, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -98,19 +98,19 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a horizontal bar rather than a vertical column graph
-$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_BAR);
+$series->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_BAR);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -131,7 +131,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-bar.php b/Examples/33chartcreate-bar.php
index 653675d6..252c2865 100644
--- a/Examples/33chartcreate-bar.php
+++ b/Examples/33chartcreate-bar.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,9 +60,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -72,7 +72,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -82,15 +82,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -98,19 +98,19 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a horizontal bar rather than a vertical column graph
-$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_BAR);
+$series->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_BAR);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Bar Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Bar Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -131,7 +131,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-column-2.php b/Examples/33chartcreate-column-2.php
index 0ade332c..b56dc823 100644
--- a/Examples/33chartcreate-column-2.php
+++ b/Examples/33chartcreate-column-2.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -68,9 +68,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 'Budget'
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 'Forecast'
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), // 'Actual'
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 'Budget'
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 'Forecast'
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), // 'Actual'
);
// Set the X-Axis Labels
// Datatype
@@ -80,7 +80,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12), // Q1 to Q4 for 2010 to 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12), // Q1 to Q4 for 2010 to 2012
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -90,15 +90,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', NULL, 12),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -106,20 +106,20 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a vertical column rather than a horizontal bar graph
-$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
+$series->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_COL);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_BOTTOM, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_BOTTOM, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Grouped Column Chart');
-$xAxisLabel = new PHPExcel_Chart_Title('Financial Period');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Grouped Column Chart');
+$xAxisLabel = new \PHPExcel\Chart\Title('Financial Period');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -140,7 +140,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-column.php b/Examples/33chartcreate-column.php
index 67f41784..31adddec 100644
--- a/Examples/33chartcreate-column.php
+++ b/Examples/33chartcreate-column.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,9 +60,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -72,7 +72,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -82,15 +82,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STANDARD, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -98,19 +98,19 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a vertical column rather than a horizontal bar graph
-$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
+$series->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_COL);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Column Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Column Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -131,7 +131,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-composite.php b/Examples/33chartcreate-composite.php
index be7ad94a..a447068c 100644
--- a/Examples/33chartcreate-composite.php
+++ b/Examples/33chartcreate-composite.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -69,13 +69,13 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels1 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // Temperature
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // Temperature
);
$dataSeriesLabels2 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // Rainfall
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // Rainfall
);
$dataSeriesLabels3 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // Humidity
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // Humidity
);
// Set the X-Axis Labels
@@ -86,7 +86,7 @@ $dataSeriesLabels3 = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
);
@@ -98,13 +98,13 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues1 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$13', NULL, 12),
);
// Build the dataseries
-$series1 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping
+$series1 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED, // plotGrouping
range(0, count($dataSeriesValues1)-1), // plotOrder
$dataSeriesLabels1, // plotLabel
$xAxisTickValues, // plotCategory
@@ -112,7 +112,7 @@ $series1 = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a vertical column rather than a horizontal bar graph
-$series1->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
+$series1->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_COL);
// Set the Data values for each data series we want to plot
@@ -123,13 +123,13 @@ $series1->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
// Data values
// Data Marker
$dataSeriesValues2 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
);
// Build the dataseries
-$series2 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_LINECHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
+$series2 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_LINECHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STANDARD, // plotGrouping
range(0, count($dataSeriesValues2)-1), // plotOrder
$dataSeriesLabels2, // plotLabel
NULL, // plotCategory
@@ -145,13 +145,13 @@ $series2 = new PHPExcel_Chart_DataSeries(
// Data values
// Data Marker
$dataSeriesValues3 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
);
// Build the dataseries
-$series3 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
+$series3 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_AREACHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STANDARD, // plotGrouping
range(0, count($dataSeriesValues2)-1), // plotOrder
$dataSeriesLabels3, // plotLabel
NULL, // plotCategory
@@ -160,15 +160,15 @@ $series3 = new PHPExcel_Chart_DataSeries(
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series1, $series2, $series3));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series1, $series2, $series3));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Average Weather Chart for Crete');
+$title = new \PHPExcel\Chart\Title('Average Weather Chart for Crete');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -189,7 +189,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-line.php b/Examples/33chartcreate-line.php
index 90c2e60c..99022890 100644
--- a/Examples/33chartcreate-line.php
+++ b/Examples/33chartcreate-line.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,9 +60,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -72,7 +72,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -82,15 +82,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_LINECHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STACKED, // plotGrouping
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_LINECHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STACKED, // plotGrouping
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
@@ -98,16 +98,16 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_TOPRIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Stacked Line Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Stacked Line Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -128,7 +128,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-multiple-charts.php b/Examples/33chartcreate-multiple-charts.php
index 0e5ac60e..b597ee4c 100644
--- a/Examples/33chartcreate-multiple-charts.php
+++ b/Examples/33chartcreate-multiple-charts.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -61,9 +61,9 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels1 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -73,7 +73,7 @@ $dataSeriesLabels1 = array(
// Data values
// Data Marker
$xAxisTickValues1 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -83,15 +83,15 @@ $xAxisTickValues1 = array(
// Data values
// Data Marker
$dataSeriesValues1 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series1 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping
+$series1 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_AREACHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping
range(0, count($dataSeriesValues1)-1), // plotOrder
$dataSeriesLabels1, // plotLabel
$xAxisTickValues1, // plotCategory
@@ -99,16 +99,16 @@ $series1 = new PHPExcel_Chart_DataSeries(
);
// Set the series in the plot area
-$plotArea1 = new PHPExcel_Chart_PlotArea(NULL, array($series1));
+$plotArea1 = new \PHPExcel\Chart\PlotArea(NULL, array($series1));
// Set the chart legend
-$legend1 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false);
+$legend1 = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_TOPRIGHT, NULL, false);
-$title1 = new PHPExcel_Chart_Title('Test %age-Stacked Area Chart');
-$yAxisLabel1 = new PHPExcel_Chart_Title('Value ($k)');
+$title1 = new \PHPExcel\Chart\Title('Test %age-Stacked Area Chart');
+$yAxisLabel1 = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart1 = new PHPExcel_Chart(
+$chart1 = new \PHPExcel\Chart(
'chart1', // name
$title1, // title
$legend1, // legend
@@ -135,9 +135,9 @@ $objWorksheet->addChart($chart1);
// Data values
// Data Marker
$dataSeriesLabels2 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -147,7 +147,7 @@ $dataSeriesLabels2 = array(
// Data values
// Data Marker
$xAxisTickValues2 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -157,15 +157,15 @@ $xAxisTickValues2 = array(
// Data values
// Data Marker
$dataSeriesValues2 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series2 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType
- PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
+$series2 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
+ \PHPExcel\Chart\DataSeries::GROUPING_STANDARD, // plotGrouping
range(0, count($dataSeriesValues2)-1), // plotOrder
$dataSeriesLabels2, // plotLabel
$xAxisTickValues2, // plotCategory
@@ -173,19 +173,19 @@ $series2 = new PHPExcel_Chart_DataSeries(
);
// Set additional dataseries parameters
// Make it a vertical column rather than a horizontal bar graph
-$series2->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL);
+$series2->setPlotDirection(\PHPExcel\Chart\DataSeries::DIRECTION_COL);
// Set the series in the plot area
-$plotArea2 = new PHPExcel_Chart_PlotArea(NULL, array($series2));
+$plotArea2 = new \PHPExcel\Chart\PlotArea(NULL, array($series2));
// Set the chart legend
-$legend2 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend2 = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title2 = new PHPExcel_Chart_Title('Test Column Chart');
-$yAxisLabel2 = new PHPExcel_Chart_Title('Value ($k)');
+$title2 = new \PHPExcel\Chart\Title('Test Column Chart');
+$yAxisLabel2 = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart2 = new PHPExcel_Chart(
+$chart2 = new \PHPExcel\Chart(
'chart2', // name
$title2, // title
$legend2, // legend
@@ -206,7 +206,7 @@ $objWorksheet->addChart($chart2);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-pie.php b/Examples/33chartcreate-pie.php
index 78b6293f..37e8a665 100644
--- a/Examples/33chartcreate-pie.php
+++ b/Examples/33chartcreate-pie.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -61,7 +61,7 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels1 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
);
// Set the X-Axis Labels
// Datatype
@@ -71,7 +71,7 @@ $dataSeriesLabels1 = array(
// Data values
// Data Marker
$xAxisTickValues1 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -81,12 +81,12 @@ $xAxisTickValues1 = array(
// Data values
// Data Marker
$dataSeriesValues1 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
);
// Build the dataseries
-$series1 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_PIECHART, // plotType
+$series1 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_PIECHART, // plotType
NULL, // plotGrouping (Pie charts don't have any grouping)
range(0, count($dataSeriesValues1)-1), // plotOrder
$dataSeriesLabels1, // plotLabel
@@ -95,20 +95,20 @@ $series1 = new PHPExcel_Chart_DataSeries(
);
// Set up a layout object for the Pie chart
-$layout1 = new PHPExcel_Chart_Layout();
+$layout1 = new \PHPExcel\Chart\Layout();
$layout1->setShowVal(TRUE);
$layout1->setShowPercent(TRUE);
// Set the series in the plot area
-$plotArea1 = new PHPExcel_Chart_PlotArea($layout1, array($series1));
+$plotArea1 = new \PHPExcel\Chart\PlotArea($layout1, array($series1));
// Set the chart legend
-$legend1 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend1 = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title1 = new PHPExcel_Chart_Title('Test Pie Chart');
+$title1 = new \PHPExcel\Chart\Title('Test Pie Chart');
// Create the chart
-$chart1 = new PHPExcel_Chart(
+$chart1 = new \PHPExcel\Chart(
'chart1', // name
$title1, // title
$legend1, // legend
@@ -135,7 +135,7 @@ $objWorksheet->addChart($chart1);
// Data values
// Data Marker
$dataSeriesLabels2 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
);
// Set the X-Axis Labels
// Datatype
@@ -145,7 +145,7 @@ $dataSeriesLabels2 = array(
// Data values
// Data Marker
$xAxisTickValues2 = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -155,12 +155,12 @@ $xAxisTickValues2 = array(
// Data values
// Data Marker
$dataSeriesValues2 = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
);
// Build the dataseries
-$series2 = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_DONUTCHART, // plotType
+$series2 = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_DONUTCHART, // plotType
NULL, // plotGrouping (Donut charts don't have any grouping)
range(0, count($dataSeriesValues2)-1), // plotOrder
$dataSeriesLabels2, // plotLabel
@@ -169,18 +169,18 @@ $series2 = new PHPExcel_Chart_DataSeries(
);
// Set up a layout object for the Pie chart
-$layout2 = new PHPExcel_Chart_Layout();
+$layout2 = new \PHPExcel\Chart\Layout();
$layout2->setShowVal(TRUE);
$layout2->setShowCatName(TRUE);
// Set the series in the plot area
-$plotArea2 = new PHPExcel_Chart_PlotArea($layout2, array($series2));
+$plotArea2 = new \PHPExcel\Chart\PlotArea($layout2, array($series2));
-$title2 = new PHPExcel_Chart_Title('Test Donut Chart');
+$title2 = new \PHPExcel\Chart\Title('Test Donut Chart');
// Create the chart
-$chart2 = new PHPExcel_Chart(
+$chart2 = new \PHPExcel\Chart(
'chart2', // name
$title2, // title
NULL, // legend
@@ -201,7 +201,7 @@ $objWorksheet->addChart($chart2);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-radar.php b/Examples/33chartcreate-radar.php
index 0c28addf..d32e2c98 100644
--- a/Examples/33chartcreate-radar.php
+++ b/Examples/33chartcreate-radar.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -69,8 +69,8 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
// Datatype
@@ -80,8 +80,8 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -91,35 +91,35 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_RADARCHART, // plotType
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_RADARCHART, // plotType
NULL, // plotGrouping (Radar charts don't have any grouping)
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
$dataSeriesValues, // plotValues
NULL, // smooth line
- PHPExcel_Chart_DataSeries::STYLE_MARKER // plotStyle
+ \PHPExcel\Chart\DataSeries::STYLE_MARKER // plotStyle
);
// Set up a layout object for the Pie chart
-$layout = new PHPExcel_Chart_Layout();
+$layout = new \PHPExcel\Chart\Layout();
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea($layout, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea($layout, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Radar Chart');
+$title = new \PHPExcel\Chart\Title('Test Radar Chart');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -140,7 +140,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-scatter.php b/Examples/33chartcreate-scatter.php
index 7fc5b5ad..ca742d85 100644
--- a/Examples/33chartcreate-scatter.php
+++ b/Examples/33chartcreate-scatter.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -60,13 +60,13 @@ $objWorksheet->fromArray(
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012
);
// Set the X-Axis Labels
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -76,34 +76,34 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART, // plotType
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_SCATTERCHART, // plotType
NULL, // plotGrouping (Scatter charts don't have any grouping)
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
$xAxisTickValues, // plotCategory
$dataSeriesValues, // plotValues
NULL, // smooth line
- PHPExcel_Chart_DataSeries::STYLE_LINEMARKER // plotStyle
+ \PHPExcel\Chart\DataSeries::STYLE_LINEMARKER // plotStyle
);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_TOPRIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Scatter Chart');
-$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)');
+$title = new \PHPExcel\Chart\Title('Test Scatter Chart');
+$yAxisLabel = new \PHPExcel\Chart\Title('Value ($k)');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'chart1', // name
$title, // title
$legend, // legend
@@ -124,7 +124,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/33chartcreate-stock.php b/Examples/33chartcreate-stock.php
index 465107b3..b05b9f41 100644
--- a/Examples/33chartcreate-stock.php
+++ b/Examples/33chartcreate-stock.php
@@ -37,10 +37,10 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$objWorksheet = $objPHPExcel->getActiveSheet();
$objWorksheet->fromArray(
array(
@@ -52,7 +52,7 @@ $objWorksheet->fromArray(
array(100, 40, 5, 0, 50 ),
), null, 'A1', true
);
-$objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00);
+$objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel\Style\NumberFormat::FORMAT_NUMBER_00);
// Set the Labels for each data series we want to plot
@@ -63,10 +63,10 @@ $objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel_Styl
// Data values
// Data Marker
$dataSeriesLabels = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //Max / Open
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //Min / Close
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //Min Threshold / Min
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //Max Threshold / Max
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //Max / Open
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //Min / Close
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //Min Threshold / Min
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //Max Threshold / Max
);
// Set the X-Axis Labels
// Datatype
@@ -76,7 +76,7 @@ $dataSeriesLabels = array(
// Data values
// Data Marker
$xAxisTickValues = array(
- new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5), // Counts
+ new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5), // Counts
);
// Set the Data values for each data series we want to plot
// Datatype
@@ -86,15 +86,15 @@ $xAxisTickValues = array(
// Data values
// Data Marker
$dataSeriesValues = array(
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', NULL, 5),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', NULL, 5),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', NULL, 5),
- new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', NULL, 5),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', NULL, 5),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', NULL, 5),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', NULL, 5),
+ new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', NULL, 5),
);
// Build the dataseries
-$series = new PHPExcel_Chart_DataSeries(
- PHPExcel_Chart_DataSeries::TYPE_STOCKCHART, // plotType
+$series = new \PHPExcel\Chart\DataSeries(
+ \PHPExcel\Chart\DataSeries::TYPE_STOCKCHART, // plotType
null, // plotGrouping - if we set this to not null, then xlsx throws error
range(0, count($dataSeriesValues)-1), // plotOrder
$dataSeriesLabels, // plotLabel
@@ -103,16 +103,16 @@ $series = new PHPExcel_Chart_DataSeries(
);
// Set the series in the plot area
-$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series));
+$plotArea = new \PHPExcel\Chart\PlotArea(NULL, array($series));
// Set the chart legend
-$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false);
+$legend = new \PHPExcel\Chart\Legend(\PHPExcel\Chart\Legend::POSITION_RIGHT, NULL, false);
-$title = new PHPExcel_Chart_Title('Test Stock Chart');
-$xAxisLabel = new PHPExcel_Chart_Title('Counts');
-$yAxisLabel = new PHPExcel_Chart_Title('Values');
+$title = new \PHPExcel\Chart\Title('Test Stock Chart');
+$xAxisLabel = new \PHPExcel\Chart\Title('Counts');
+$yAxisLabel = new \PHPExcel\Chart\Title('Values');
// Create the chart
-$chart = new PHPExcel_Chart(
+$chart = new \PHPExcel\Chart(
'stock-chart', // name
$title, // title
$legend, // legend
@@ -133,7 +133,7 @@ $objWorksheet->addChart($chart);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$filename = str_replace('.php', '.xlsx', __FILE__);
if(file_exists($filename)) {
diff --git a/Examples/34chartupdate.php b/Examples/34chartupdate.php
index f4b36c6b..66fd0d12 100644
--- a/Examples/34chartupdate.php
+++ b/Examples/34chartupdate.php
@@ -37,14 +37,14 @@ date_default_timezone_set('Europe/London');
*/
/** PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("33chartcreate-bar.xlsx")) {
exit("Please run 33chartcreate-bar.php first." . EOL);
}
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
-$objReader = PHPExcel_IOFactory::createReader("Excel2007");
+$objReader = \PHPExcel\IOFactory::createReader("Excel2007");
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load("33chartcreate-bar.xlsx");
@@ -64,7 +64,7 @@ $objWorksheet->fromArray(
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/35chartrender.php b/Examples/35chartrender.php
index 62719e51..26b591c7 100644
--- a/Examples/35chartrender.php
+++ b/Examples/35chartrender.php
@@ -10,47 +10,18 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/**
- * PHPExcel
- *
- * Copyright (c) 2006 - 2015 PHPExcel
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * @category PHPExcel
- * @package PHPExcel
- * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
- * @version ##VERSION##, ##DATE##
- */
-
-/** Include path **/
-set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/');
-
-/** PHPExcel_IOFactory */
-include 'PHPExcel/IOFactory.php';
+/** PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the Rendering library that you wish to use
// and its directory location on your server
-$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH;
+$rendererName = PHPExcel\Settings::CHART_RENDERER_JPGRAPH;
$rendererLibrary = 'jpgraph3.5.0b1/src/';
$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary;
-if (!PHPExcel_Settings::setChartRenderer(
+if (!PHPExcel\Settings::setChartRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -83,7 +54,7 @@ foreach($inputFileNames as $inputFileName) {
echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
- $objReader = PHPExcel_IOFactory::createReader($inputFileType);
+ $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load($inputFileName);
diff --git a/Examples/36chartreadwriteHTML.php b/Examples/36chartreadwriteHTML.php
index 7fc26fde..4eb8db17 100644
--- a/Examples/36chartreadwriteHTML.php
+++ b/Examples/36chartreadwriteHTML.php
@@ -10,47 +10,18 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/**
- * PHPExcel
- *
- * Copyright (c) 2006 - 2015 PHPExcel
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * @category PHPExcel
- * @package PHPExcel
- * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
- * @version ##VERSION##, ##DATE##
- */
-
-/** Include path **/
-set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/');
-
-/** PHPExcel_IOFactory */
-include 'PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the Rendering library that you wish to use
// and its directory location on your server
-$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH;
+$rendererName = PHPExcel\Settings::CHART_RENDERER_JPGRAPH;
$rendererLibrary = 'jpgraph3.5.0b1/src/';
$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary;
-if (!PHPExcel_Settings::setChartRenderer(
+if (!PHPExcel\Settings::setChartRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -83,7 +54,7 @@ foreach($inputFileNames as $inputFileName) {
echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
- $objReader = PHPExcel_IOFactory::createReader($inputFileType);
+ $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load($inputFileName);
@@ -134,7 +105,7 @@ foreach($inputFileNames as $inputFileName) {
$outputFileName = str_replace('.xlsx', '.html', basename($inputFileName));
echo date('H:i:s') , " Write Tests to HTML file " , EOL;
- $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');
+ $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save($outputFileName);
echo date('H:i:s') , " File written to " , $outputFileName , EOL;
diff --git a/Examples/36chartreadwritePDF.php b/Examples/36chartreadwritePDF.php
index 24d1c857..8e47859d 100644
--- a/Examples/36chartreadwritePDF.php
+++ b/Examples/36chartreadwritePDF.php
@@ -10,51 +10,22 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/**
- * PHPExcel
- *
- * Copyright (c) 2006 - 2015 PHPExcel
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * @category PHPExcel
- * @package PHPExcel
- * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
- * @version ##VERSION##, ##DATE##
- */
-
-/** Include path **/
-set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/');
-
-/** PHPExcel_IOFactory */
-include 'PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Change these values to select the Rendering library that you wish to use
// for PDF files, and its directory location on your server
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF;
-$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF;
-//$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF;
+//$rendererName = PHPExcel\Settings::PDF_RENDERER_TCPDF;
+$rendererName = PHPExcel\Settings::PDF_RENDERER_MPDF;
+//$rendererName = PHPExcel\Settings::PDF_RENDERER_DOMPDF;
//$rendererLibrary = 'tcPDF5.9';
$rendererLibrary = 'mPDF5.4';
//$rendererLibrary = 'domPDF0.6.0beta3';
$rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary;
-if (!PHPExcel_Settings::setPdfRenderer(
+if (!PHPExcel\Settings::setPdfRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -68,12 +39,12 @@ if (!PHPExcel_Settings::setPdfRenderer(
// Change these values to select the Rendering library that you wish to use
// for Chart images, and its directory location on your server
-$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH;
+$rendererName = PHPExcel\Settings::CHART_RENDERER_JPGRAPH;
$rendererLibrary = 'jpgraph3.5.0b1/src/';
$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary;
-if (!PHPExcel_Settings::setChartRenderer(
+if (!PHPExcel\Settings::setChartRenderer(
$rendererName,
$rendererLibraryPath
)) {
@@ -106,7 +77,7 @@ foreach($inputFileNames as $inputFileName) {
echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
- $objReader = PHPExcel_IOFactory::createReader($inputFileType);
+ $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load($inputFileName);
@@ -157,7 +128,7 @@ foreach($inputFileNames as $inputFileName) {
$outputFileName = str_replace('.xlsx', '.pdf', basename($inputFileName));
echo date('H:i:s') , " Write Tests to HTML file " , EOL;
- $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');
+ $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save($outputFileName);
echo date('H:i:s') , " File written to " , $outputFileName , EOL;
diff --git a/Examples/37page_layout_view.php b/Examples/37page_layout_view.php
index 810ca3d2..edd4a60b 100644
--- a/Examples/37page_layout_view.php
+++ b/Examples/37page_layout_view.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -62,16 +62,16 @@ $objPHPExcel->setActiveSheetIndex(0)
$objPHPExcel->setActiveSheetIndex(0);
// Set the page layout view as page layout
-$objPHPExcel->getActiveSheet()->getSheetView()->setView(PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT);
+$objPHPExcel->getActiveSheet()->getSheetView()->setView(PHPExcel\Worksheet\SheetView::SHEETVIEW_PAGE_LAYOUT);
// Save Excel 2007 file
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
// Save Excel5 file
echo date('H:i:s') , " Write to Excel5 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/38cloneWorksheet.php b/Examples/38cloneWorksheet.php
index 245f7da4..7cf559be 100644
--- a/Examples/38cloneWorksheet.php
+++ b/Examples/38cloneWorksheet.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -99,7 +99,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/39dropdown.php b/Examples/39dropdown.php
index c8dcff67..a67cecf8 100644
--- a/Examples/39dropdown.php
+++ b/Examples/39dropdown.php
@@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties
echo date('H:i:s') , " Set document properties" , EOL;
@@ -74,7 +74,7 @@ foreach(glob('./data/continents/*') as $key => $filename) {
$objPHPExcel->getActiveSheet()
->fromArray($countries, null, $column . '1');
$objPHPExcel->addNamedRange(
- new PHPExcel_NamedRange(
+ new PHPExcel\NamedRange(
$continent,
$objPHPExcel->getActiveSheet(), $column . '1:' . $column . $countryCount
)
@@ -95,7 +95,7 @@ $objPHPExcel->getActiveSheet()
->setVisible(false);
$objPHPExcel->addNamedRange(
- new PHPExcel_NamedRange(
+ new PHPExcel\NamedRange(
'Continents',
$objPHPExcel->getActiveSheet(), $continentColumn . '1:' . $continentColumn . ($key+1)
)
@@ -119,8 +119,8 @@ $objPHPExcel->getActiveSheet()
$objValidation = $objPHPExcel->getActiveSheet()
->getCell('B1')
->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST )
- ->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION )
+$objValidation->setType( PHPExcel\Cell\DataValidation::TYPE_LIST )
+ ->setErrorStyle( PHPExcel\Cell\DataValidation::STYLE_INFORMATION )
->setAllowBlank(false)
->setShowInputMessage(true)
->setShowErrorMessage(true)
@@ -140,8 +140,8 @@ $objPHPExcel->getActiveSheet()
$objValidation = $objPHPExcel->getActiveSheet()
->getCell('B3')
->getDataValidation();
-$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST )
- ->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION )
+$objValidation->setType( PHPExcel\Cell\DataValidation::TYPE_LIST )
+ ->setErrorStyle( PHPExcel\Cell\DataValidation::STYLE_INFORMATION )
->setAllowBlank(false)
->setShowInputMessage(true)
->setShowErrorMessage(true)
@@ -163,7 +163,7 @@ $objPHPExcel->setActiveSheetIndex(0);
// Save Excel 2007 file
// This linked validation list method only seems to work for Excel2007, not for Excel5
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/40duplicateStyle.php b/Examples/40duplicateStyle.php
index be31951a..28439b12 100644
--- a/Examples/40duplicateStyle.php
+++ b/Examples/40duplicateStyle.php
@@ -10,16 +10,16 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
/** Include PHPExcel */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
-$objPHPExcel = new PHPExcel();
+$objPHPExcel = new \PHPExcel\Spreadsheet();
$worksheet = $objPHPExcel->getActiveSheet();
echo date('H:i:s') , " Create styles array" , EOL;
$styles = array();
for ($i = 0; $i < 10; $i++) {
- $style = new PHPExcel_Style();
+ $style = new \PHPExcel\Style();
$style->getFont()->setSize($i + 4);
$styles[] = $style;
}
@@ -30,7 +30,7 @@ for ($col = 0; $col < 50; $col++) {
for ($row = 0; $row < 100; $row++) {
$str = ($row + $col);
$style = $styles[$row % 10];
- $coord = PHPExcel_Cell::stringFromColumnIndex($col) . ($row + 1);
+ $coord = \PHPExcel\Cell::stringFromColumnIndex($col) . ($row + 1);
$worksheet->setCellValue($coord, $str);
$worksheet->duplicateStyle($style, $coord);
}
@@ -40,7 +40,7 @@ echo date('H:i:s') , " Add data (end), time: " . round($d, 2) . " s", EOL;
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
diff --git a/Examples/41password.php b/Examples/41password.php
index 15aea7ba..624d59c2 100644
--- a/Examples/41password.php
+++ b/Examples/41password.php
@@ -36,8 +36,8 @@ date_default_timezone_set('Europe/London');
include "05featuredemo.inc.php";
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Set password against the spreadsheet file
@@ -50,7 +50,7 @@ $objPHPExcel->getSecurity()->setWorkbookPassword('secret');
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -65,7 +65,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
diff --git a/Examples/43mergeWorkbooks.php b/Examples/43mergeWorkbooks.php
index 465b60a3..990c7561 100644
--- a/Examples/43mergeWorkbooks.php
+++ b/Examples/43mergeWorkbooks.php
@@ -33,14 +33,14 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
echo date('H:i:s') , " Load MergeBook1 from Excel2007 file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel1 = PHPExcel_IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook1.xlsx");
+$objPHPExcel1 = \PHPExcel\IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook1.xlsx");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -52,7 +52,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Load MergeBook2 from Excel2007 file" , EOL;
$callStartTime = microtime(true);
-$objPHPExcel2 = PHPExcel_IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook2.xlsx");
+$objPHPExcel2 = \PHPExcel\IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook2.xlsx");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -71,7 +71,7 @@ foreach($objPHPExcel2->getSheetNames() as $sheetName) {
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel1, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel1, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);
diff --git a/Examples/44worksheetInfo.php b/Examples/44worksheetInfo.php
index 5aeefcbd..c976a68b 100644
--- a/Examples/44worksheetInfo.php
+++ b/Examples/44worksheetInfo.php
@@ -33,17 +33,16 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '
');
date_default_timezone_set('Europe/London');
-/** Include PHPExcel_IOFactory */
-require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
-
+/** Include PHPExcel */
+require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("05featuredemo.xlsx")) {
exit("Please run 05featuredemo.php first." . EOL);
}
$inputFileName = "05featuredemo.xlsx";
-$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
-$objReader = PHPExcel_IOFactory::createReader($inputFileType);
+$inputFileType = \PHPExcel\IOFactory::identify($inputFileName);
+$objReader = \PHPExcel\IOFactory::createReader($inputFileType);
$sheetList = $objReader->listWorksheetNames($inputFileName);
$sheetInfo = $objReader->listWorksheetInfo($inputFileName);
diff --git a/Examples/Excel2003XMLReader.php b/Examples/Excel2003XMLReader.php
index e77f8a97..3bf352a5 100644
--- a/Examples/Excel2003XMLReader.php
+++ b/Examples/Excel2003XMLReader.php
@@ -30,14 +30,14 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
echo date('H:i:s') , " Load from Excel2003XML file" , PHP_EOL;
$callStartTime = microtime(true);
-$objReader = PHPExcel_IOFactory::createReader('Excel2003XML');
+$objReader = \PHPExcel\IOFactory::createReader('Excel2003XML');
$objPHPExcel = $objReader->load("Excel2003XMLTest.xml");
@@ -49,7 +49,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', __FILE__) , PHP_EOL;
diff --git a/Examples/GnumericReader.php b/Examples/GnumericReader.php
index 1b22e2cb..d839eb1a 100644
--- a/Examples/GnumericReader.php
+++ b/Examples/GnumericReader.php
@@ -30,13 +30,13 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
echo date('H:i:s') , " Load from Gnumeric file" , PHP_EOL;
$callStartTime = microtime(true);
-$objReader = PHPExcel_IOFactory::createReader('Gnumeric');
+$objReader = \PHPExcel\IOFactory::createReader('Gnumeric');
$objPHPExcel = $objReader->load("GnumericTest.gnumeric");
@@ -48,7 +48,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
diff --git a/Examples/OOCalcReader.php b/Examples/OOCalcReader.php
index 70f36063..1436cdf3 100644
--- a/Examples/OOCalcReader.php
+++ b/Examples/OOCalcReader.php
@@ -30,13 +30,13 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
echo date('H:i:s') , " Load from OOCalc file" , PHP_EOL;
$callStartTime = microtime(true);
-$objReader = PHPExcel_IOFactory::createReader('OOCalc');
+$objReader = \PHPExcel\IOFactory::createReader('OOCalc');
$objPHPExcel = $objReader->load("OOCalcTest.ods");
@@ -48,7 +48,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
diff --git a/Examples/OOCalcReaderPCLZip.php b/Examples/OOCalcReaderPCLZip.php
index 2fc771cd..3d1d23a0 100644
--- a/Examples/OOCalcReaderPCLZip.php
+++ b/Examples/OOCalcReaderPCLZip.php
@@ -30,16 +30,16 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
// Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file
-PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
+PHPExcel\Settings::setZipClass(PHPExcel\Settings::PCLZIP);
echo date('H:i:s') , " Load from OOCalc file" , PHP_EOL;
$callStartTime = microtime(true);
-$objReader = PHPExcel_IOFactory::createReader('OOCalc');
+$objReader = \PHPExcel\IOFactory::createReader('OOCalc');
$objPHPExcel = $objReader->load("OOCalcTest.ods");
@@ -51,7 +51,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
diff --git a/Examples/Quadratic.php b/Examples/Quadratic.php
index 11a712e5..dec9fb6e 100644
--- a/Examples/Quadratic.php
+++ b/Examples/Quadratic.php
@@ -40,7 +40,7 @@ if (isset($_POST['submit'])) {
include 'PHPExcel/IOFactory.php';
/** Load the quadratic equation solver worksheet into memory **/
- $objPHPExcel = PHPExcel_IOFactory::load('./Quadratic.xlsx');
+ $objPHPExcel = \PHPExcel\IOFactory::load('./Quadratic.xlsx');
/** Set our A, B and C values **/
$objPHPExcel->getActiveSheet()->setCellValue('A1', $_POST['A']);
diff --git a/Examples/SylkReader.php b/Examples/SylkReader.php
index a16a4f05..75cb03ce 100644
--- a/Examples/SylkReader.php
+++ b/Examples/SylkReader.php
@@ -30,15 +30,15 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
echo date('H:i:s') , " Load from SYLK file" , PHP_EOL;
-$objPHPExcel = PHPExcel_IOFactory::load("SylkTest.slk");
+$objPHPExcel = \PHPExcel\IOFactory::load("SylkTest.slk");
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
diff --git a/Examples/XMLReader.php b/Examples/XMLReader.php
index 836f6b2d..d7b3b8a3 100644
--- a/Examples/XMLReader.php
+++ b/Examples/XMLReader.php
@@ -30,7 +30,7 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
-/** PHPExcel_IOFactory */
+/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
@@ -38,17 +38,17 @@ echo date('H:i:s') , " Load from XML file" , PHP_EOL;
$inputFileName = "XMLTest.xml";
/** Identify the type of $inputFileName **/
-$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
+$inputFileType = \PHPExcel\IOFactory::identify($inputFileName);
echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL;
/** Create a new Reader of the type that has been identified **/
-$objReader = PHPExcel_IOFactory::createReader($inputFileType);
+$objReader = \PHPExcel\IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
-$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
+$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
diff --git a/src/PhpSpreadsheet/CachedObjectStorage/SQLite3.php b/src/PhpSpreadsheet/CachedObjectStorage/SQLite3.php
index f6c4c0e2..fe6b41df 100644
--- a/src/PhpSpreadsheet/CachedObjectStorage/SQLite3.php
+++ b/src/PhpSpreadsheet/CachedObjectStorage/SQLite3.php
@@ -308,7 +308,7 @@ class SQLite3 extends CacheBase implements ICache
$this->TableName = str_replace('.', '_', $this->getUniqueID());
$_DBName = ':memory:';
- $this->DBHandle = new SQLite3($_DBName);
+ $this->DBHandle = new \SQLite3($_DBName);
if ($this->DBHandle === false) {
throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
}
diff --git a/src/PhpSpreadsheet/Calculation.php b/src/PhpSpreadsheet/Calculation.php
index 2b12ee7d..e1a99144 100644
--- a/src/PhpSpreadsheet/Calculation.php
+++ b/src/PhpSpreadsheet/Calculation.php
@@ -2093,7 +2093,7 @@ class Calculation
public static function getInstance(Spreadsheet $spreadsheet = null)
{
if ($spreadsheet !== null) {
- $instance = $workbook->getCalculationEngine();
+ $instance = $spreadsheet->getCalculationEngine();
if (isset($instance)) {
return $instance;
}
diff --git a/src/PhpSpreadsheet/Calculation/DateTime.php b/src/PhpSpreadsheet/Calculation/DateTime.php
index 291a982a..2bafcc9e 100644
--- a/src/PhpSpreadsheet/Calculation/DateTime.php
+++ b/src/PhpSpreadsheet/Calculation/DateTime.php
@@ -1489,7 +1489,7 @@ class DateTime
case Functions::RETURNDATE_EXCEL:
return (float) \PHPExcel\Shared\Date::PHPToExcel($PHPDateObject);
case Functions::RETURNDATE_PHP_NUMERIC:
- return (integer) \PHPExcel\Shared\Date::ExcelToPHP(PHPExcel\Shared\Date::PHPToExcel($PHPDateObject));
+ return (integer) \PHPExcel\Shared\Date::ExcelToPHP(\PHPExcel\Shared\Date::PHPToExcel($PHPDateObject));
case Functions::RETURNDATE_PHP_OBJECT:
return $PHPDateObject;
}
diff --git a/src/PhpSpreadsheet/Calculation/MathTrig.php b/src/PhpSpreadsheet/Calculation/MathTrig.php
index 45a32da0..8a4310cb 100644
--- a/src/PhpSpreadsheet/Calculation/MathTrig.php
+++ b/src/PhpSpreadsheet/Calculation/MathTrig.php
@@ -1212,27 +1212,28 @@ class MathTrig
return $returnValue;
}
- /**
- * SUMIFS
- *
- * Counts the number of cells that contain numbers within the list of arguments
- *
- * Excel Function:
- * SUMIFS(value1[,value2[, ...]],condition)
- *
- * @access public
- * @category Mathematical and Trigonometric Functions
- * @param mixed $arg,... Data values
- * @param string $condition The criteria that defines which cells will be summed.
- * @return float
- */
- public static function SUMIFS() {
- $arrayList = func_get_args();
+ /**
+ * SUMIFS
+ *
+ * Counts the number of cells that contain numbers within the list of arguments
+ *
+ * Excel Function:
+ * SUMIFS(value1[,value2[, ...]],condition)
+ *
+ * @access public
+ * @category Mathematical and Trigonometric Functions
+ * @param mixed $arg,... Data values
+ * @param string $condition The criteria that defines which cells will be summed.
+ * @return float
+ */
+ public static function SUMIFS()
+ {
+ $arrayList = func_get_args();
- // Return value
- $returnValue = 0;
+ // Return value
+ $returnValue = 0;
- $sumArgs = Functions::flattenArray(array_shift($arrayList));
+ $sumArgs = Functions::flattenArray(array_shift($arrayList));
while (count($arrayList) > 0) {
$aArgsArray[] = Functions::flattenArray(array_shift($arrayList));
@@ -1256,9 +1257,9 @@ class MathTrig
}
}
- // Return
- return $returnValue;
- }
+ // Return
+ return $returnValue;
+ }
/**
* SUMPRODUCT
diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php
index a318cea2..fc5e0941 100644
--- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php
+++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Chart;
/**
- * PHPExcel_Chart_DataSeriesValues
+ * \PHPExcel\Chart\DataSeriesValues
*
* Copyright (c) 2006 - 2015 PHPExcel
*
diff --git a/src/PhpSpreadsheet/Chart/Layout.php b/src/PhpSpreadsheet/Chart/Layout.php
index e0d081ce..1b78eee6 100644
--- a/src/PhpSpreadsheet/Chart/Layout.php
+++ b/src/PhpSpreadsheet/Chart/Layout.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Chart;
/**
- * PHPExcel_Chart_Layout
+ * \PHPExcel\Chart\Layout
*
* Copyright (c) 2006 - 2015 PHPExcel
*
diff --git a/src/PhpSpreadsheet/Chart/Legend.php b/src/PhpSpreadsheet/Chart/Legend.php
index f9dc6d0e..237a7a55 100644
--- a/src/PhpSpreadsheet/Chart/Legend.php
+++ b/src/PhpSpreadsheet/Chart/Legend.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Chart;
/**
- * PHPExcel_Chart_Legend
+ * \PHPExcel\Chart\Legend
*
* Copyright (c) 2006 - 2015 PHPExcel
*
diff --git a/src/PhpSpreadsheet/Helper/HTML.php b/src/PhpSpreadsheet/Helper/HTML.php
index 703bf20b..8e7de536 100644
--- a/src/PhpSpreadsheet/Helper/HTML.php
+++ b/src/PhpSpreadsheet/Helper/HTML.php
@@ -634,7 +634,7 @@ class HTML
protected function cleanWhitespace()
{
- foreach($this->richTextObject->getRichTextElements() as $key => $element) {
+ foreach ($this->richTextObject->getRichTextElements() as $key => $element) {
$text = $element->getText();
// Trim any leading spaces on the first run
if ($key == 0) {
diff --git a/src/PhpSpreadsheet/IOFactory.php b/src/PhpSpreadsheet/IOFactory.php
index a5aaafbd..40cbdf78 100644
--- a/src/PhpSpreadsheet/IOFactory.php
+++ b/src/PhpSpreadsheet/IOFactory.php
@@ -198,7 +198,7 @@ class IOFactory
{
$reader = self::createReaderForFile($pFilename);
$className = get_class($reader);
- $classType = explode('_', $className);
+ $classType = explode('\\', $className);
unset($reader);
return array_pop($classType);
}
diff --git a/src/PhpSpreadsheet/NamedRange.php b/src/PhpSpreadsheet/NamedRange.php
index 672997c4..c8048889 100644
--- a/src/PhpSpreadsheet/NamedRange.php
+++ b/src/PhpSpreadsheet/NamedRange.php
@@ -3,7 +3,7 @@
namespace PHPExcel;
/**
- * PHPExcel_NamedRange
+ * PHPExcel\NamedRange
*
* Copyright (c) 2006 - 2015 PHPExcel
*
diff --git a/src/PhpSpreadsheet/Reader/CSV.php b/src/PhpSpreadsheet/Reader/CSV.php
index a6e0d0be..ef5a4972 100644
--- a/src/PhpSpreadsheet/Reader/CSV.php
+++ b/src/PhpSpreadsheet/Reader/CSV.php
@@ -2,6 +2,8 @@
namespace PHPExcel\Reader;
+use PHPExcel\Spreadsheet;
+
/**
* PHPExcel_Reader_CSV
*
@@ -230,12 +232,12 @@ class CSV extends BaseReader implements IReader
/**
* Loads PHPExcel from file into PHPExcel instance
*
- * @param string $pFilename
- * @param PHPExcel $objPHPExcel
- * @return PHPExcel
- * @throws Exception
+ * @param string $pFilename
+ * @param Spreadsheet $objPHPExcel
+ * @return Spreadsheet
+ * @throws Exception
*/
- public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
+ public function loadIntoExisting($pFilename, Spreadsheet $objPHPExcel)
{
$lineEnding = ini_get('auto_detect_line_endings');
ini_set('auto_detect_line_endings', true);
diff --git a/src/PhpSpreadsheet/Reader/Excel2003XML.php b/src/PhpSpreadsheet/Reader/Excel2003XML.php
index 51d696fb..5a1c0a21 100644
--- a/src/PhpSpreadsheet/Reader/Excel2003XML.php
+++ b/src/PhpSpreadsheet/Reader/Excel2003XML.php
@@ -1,6 +1,7 @@
attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")];
- $xml = new XMLReader();
+ $xml = new \XMLReader();
$res = $xml->xml(
$this->securityScanFile(
'zip://'.\PHPExcel\Shared\File::realpath($pFilename).'#'."$dir/$fileWorksheet"
@@ -237,12 +237,12 @@ class Excel2007 extends BaseReader implements IReader
$currCells = 0;
while ($xml->read()) {
- if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) {
+ if ($xml->name == 'row' && $xml->nodeType == \XMLReader::ELEMENT) {
$row = $xml->getAttribute('r');
$tmpInfo['totalRows'] = $row;
$tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells);
$currCells = 0;
- } elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) {
+ } elseif ($xml->name == 'c' && $xml->nodeType == \XMLReader::ELEMENT) {
$currCells++;
}
}
@@ -344,11 +344,11 @@ class Excel2007 extends BaseReader implements IReader
// Apache POI fixes
$contents = $archive->getFromIndex(
- $archive->locateName($fileName, ZIPARCHIVE::FL_NOCASE)
+ $archive->locateName($fileName, \ZipArchive::FL_NOCASE)
);
if ($contents === false) {
$contents = $archive->getFromIndex(
- $archive->locateName(substr($fileName, 1), ZIPARCHIVE::FL_NOCASE)
+ $archive->locateName(substr($fileName, 1), \ZipArchive::FL_NOCASE)
);
}
@@ -1561,7 +1561,7 @@ class Excel2007 extends BaseReader implements IReader
$this->getFromZipArchive($zip, dirname($fileDrawing) . "/_rels/" . basename($fileDrawing) . ".rels")
),
'SimpleXMLElement',
- \PHPExcel|Settings::getLibXmlLoaderOptions()
+ \PHPExcel\Settings::getLibXmlLoaderOptions()
);
$images = array();
@@ -1655,9 +1655,9 @@ class Excel2007 extends BaseReader implements IReader
$objDrawing->setResizeProportional(false);
if ($xfrm) {
- $objDrawing->setWidth(\PHPExcel\Shared_Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cx")));
- $objDrawing->setHeight(\PHPExcel\Shared_Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cy")));
- $objDrawing->setRotation(\PHPExcel\Shared_Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), "rot")));
+ $objDrawing->setWidth(\PHPExcel\Shared\Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cx")));
+ $objDrawing->setHeight(\PHPExcel\Shared\Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cy")));
+ $objDrawing->setRotation(\PHPExcel\Shared\Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), "rot")));
}
if ($outerShdw) {
$shadow = $objDrawing->getShadow();
@@ -1671,12 +1671,12 @@ class Excel2007 extends BaseReader implements IReader
}
$objDrawing->setWorksheet($docSheet);
} elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) {
- $fromCoordinate = PHPExcel\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1);
- $fromOffsetX = PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->from->colOff);
- $fromOffsetY = PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->from->rowOff);
- $toCoordinate = PHPExcel\Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col) . ($twoCellAnchor->to->row + 1);
- $toOffsetX = PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->to->colOff);
- $toOffsetY = PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->to->rowOff);
+ $fromCoordinate = \PHPExcel\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1);
+ $fromOffsetX = \PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->from->colOff);
+ $fromOffsetY = \PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->from->rowOff);
+ $toCoordinate = \PHPExcel\Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col) . ($twoCellAnchor->to->row + 1);
+ $toOffsetX = \PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->to->colOff);
+ $toOffsetY = \PHPExcel\Shared\Drawing::EMUToPixels($twoCellAnchor->to->rowOff);
$graphic = $twoCellAnchor->graphicFrame->children("http://schemas.openxmlformats.org/drawingml/2006/main")->graphic;
$chartRef = $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart;
$thisChart = (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships");
@@ -1876,7 +1876,7 @@ class Excel2007 extends BaseReader implements IReader
'SimpleXMLElement',
\PHPExcel\Settings::getLibXmlLoaderOptions()
);
- $objChart = \PHPExcel\Reader\Excel2007_Chart::readChart($chartElements, basename($chartEntryRef, '.xml'));
+ $objChart = \PHPExcel\Reader\Excel2007\Chart::readChart($chartElements, basename($chartEntryRef, '.xml'));
// echo 'Chart ', $chartEntryRef, '
';
// var_dump($charts[$chartEntryRef]);
diff --git a/src/PhpSpreadsheet/Reader/Excel5.php b/src/PhpSpreadsheet/Reader/Excel5.php
index 5af188f4..df4e3ba2 100644
--- a/src/PhpSpreadsheet/Reader/Excel5.php
+++ b/src/PhpSpreadsheet/Reader/Excel5.php
@@ -615,7 +615,7 @@ class Excel5 extends BaseReader implements IReader
$this->loadOLE($pFilename);
// Initialisations
- $this->phpExcel = new PHPExcel;
+ $this->phpExcel = new \PHPExcel\Spreadsheet();
$this->phpExcel->removeSheetByIndex(0); // remove 1st sheet
if (!$this->readDataOnly) {
$this->phpExcel->removeCellStyleXfByIndex(0); // remove the default style
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Color.php b/src/PhpSpreadsheet/Reader/Excel5/Color.php
index 62e0fa55..4b7e1f80 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Color.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Color.php
@@ -31,4 +31,4 @@ class Color
return $color;
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF5.php b/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF5.php
index 89f83fd2..67985721 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF5.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF5.php
@@ -76,4 +76,4 @@ class BIFF5
}
return array('rgb' => '000000');
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF8.php b/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF8.php
index 445b43d7..395b0cbf 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF8.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Color/BIFF8.php
@@ -76,4 +76,4 @@ class BIFF8
}
return array('rgb' => '000000');
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Color/BuiltIn.php b/src/PhpSpreadsheet/Reader/Excel5/Color/BuiltIn.php
index 237a1e8c..bb7adb85 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Color/BuiltIn.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Color/BuiltIn.php
@@ -30,4 +30,4 @@ class BuiltIn
}
return array('rgb' => '000000');
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/ErrorCode.php b/src/PhpSpreadsheet/Reader/Excel5/ErrorCode.php
index b9996ed1..79e28f39 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/ErrorCode.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/ErrorCode.php
@@ -27,4 +27,4 @@ class ErrorCode
}
return false;
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Escher.php b/src/PhpSpreadsheet/Reader/Excel5/Escher.php
index 9e702193..2930d23a 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Escher.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Escher.php
@@ -300,7 +300,7 @@ class Escher
$blipData = substr($recordData, 36 + $cbName);
// record is a container, read contents
- $reader = new \PHPExcel\Reader\Excel5_Escher($BSE);
+ $reader = new \PHPExcel\Reader\Excel5\Escher($BSE);
$reader->load($blipData);
}
@@ -446,7 +446,7 @@ class Escher
$this->pos += 8 + $length;
// record is a container, read contents
- $dgContainer = new \PHPExcel\Shared_Escher\DgContainer();
+ $dgContainer = new \PHPExcel\Shared\Escher\DgContainer();
$this->object->setDgContainer($dgContainer);
$reader = new \PHPExcel\Reader\Excel5\Escher($dgContainer);
$escher = $reader->load($recordData);
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Style/Border.php b/src/PhpSpreadsheet/Reader/Excel5/Style/Border.php
index 6cb07bfe..9d63aa07 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Style/Border.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Style/Border.php
@@ -2,25 +2,25 @@
namespace PHPExcel\Reader\Excel5\Style;
-use \PHPExcel\Style\Border;
+use \PHPExcel\Style\Border as StyleBorder;
class Border
{
protected static $map = array(
- 0x00 => Border::BORDER_NONE,
- 0x01 => Border::BORDER_THIN,
- 0x02 => Border::BORDER_MEDIUM,
- 0x03 => Border::BORDER_DASHED,
- 0x04 => Border::BORDER_DOTTED,
- 0x05 => Border::BORDER_THICK,
- 0x06 => Border::BORDER_DOUBLE,
- 0x07 => Border::BORDER_HAIR,
- 0x08 => Border::BORDER_MEDIUMDASHED,
- 0x09 => Border::BORDER_DASHDOT,
- 0x0A => Border::BORDER_MEDIUMDASHDOT,
- 0x0B => Border::BORDER_DASHDOTDOT,
- 0x0C => Border::BORDER_MEDIUMDASHDOTDOT,
- 0x0D => Border::BORDER_SLANTDASHDOT,
+ 0x00 => StyleBorder::BORDER_NONE,
+ 0x01 => StyleBorder::BORDER_THIN,
+ 0x02 => StyleBorder::BORDER_MEDIUM,
+ 0x03 => StyleBorder::BORDER_DASHED,
+ 0x04 => StyleBorder::BORDER_DOTTED,
+ 0x05 => StyleBorder::BORDER_THICK,
+ 0x06 => StyleBorder::BORDER_DOUBLE,
+ 0x07 => StyleBorder::BORDER_HAIR,
+ 0x08 => StyleBorder::BORDER_MEDIUMDASHED,
+ 0x09 => StyleBorder::BORDER_DASHDOT,
+ 0x0A => StyleBorder::BORDER_MEDIUMDASHDOT,
+ 0x0B => StyleBorder::BORDER_DASHDOTDOT,
+ 0x0C => StyleBorder::BORDER_MEDIUMDASHDOTDOT,
+ 0x0D => StyleBorder::BORDER_SLANTDASHDOT,
);
/**
@@ -35,6 +35,6 @@ class Border
if (isset(self::$map[$index])) {
return self::$map[$index];
}
- return Border::BORDER_NONE;
+ return StyleBorder::BORDER_NONE;
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Reader/Excel5/Style/FillPattern.php b/src/PhpSpreadsheet/Reader/Excel5/Style/FillPattern.php
index 3b929836..c386b30b 100644
--- a/src/PhpSpreadsheet/Reader/Excel5/Style/FillPattern.php
+++ b/src/PhpSpreadsheet/Reader/Excel5/Style/FillPattern.php
@@ -42,4 +42,4 @@ class FillPattern
}
return Fill::FILL_NONE;
}
-}
\ No newline at end of file
+}
diff --git a/src/PhpSpreadsheet/Shared/CodePage.php b/src/PhpSpreadsheet/Shared/CodePage.php
index ea5f9c00..24f4b634 100644
--- a/src/PhpSpreadsheet/Shared/CodePage.php
+++ b/src/PhpSpreadsheet/Shared/CodePage.php
@@ -118,10 +118,10 @@ class CodePage
return 'CP950'; // Macintosh Chinese Traditional
case 10003:
return 'CP1361'; // Macintosh Korean
- case 10004:
- return 'MACARABIC'; // Apple Arabic
+ case 10004:
+ return 'MACARABIC'; // Apple Arabic
case 10005:
- return 'MACHEBREW'; // Apple Hebrew
+ return 'MACHEBREW'; // Apple Hebrew
case 10006:
return 'MACGREEK'; // Macintosh Greek
case 10007:
@@ -129,11 +129,11 @@ class CodePage
case 10008:
return 'CP936'; // Macintosh - Simplified Chinese (GB 2312)
case 10010:
- return 'MACROMANIA'; // Macintosh Romania
+ return 'MACROMANIA'; // Macintosh Romania
case 10017:
- return 'MACUKRAINE'; // Macintosh Ukraine
+ return 'MACUKRAINE'; // Macintosh Ukraine
case 10021:
- return 'MACTHAI'; // Macintosh Thai
+ return 'MACTHAI'; // Macintosh Thai
case 10029:
return 'MACCENTRALEUROPE'; // Macintosh Central Europe
case 10079:
@@ -141,7 +141,7 @@ class CodePage
case 10081:
return 'MACTURKISH'; // Macintosh Turkish
case 10082:
- return 'MACCROATIAN'; // Macintosh Croatian
+ return 'MACCROATIAN'; // Macintosh Croatian
case 21010:
return 'UTF-16LE'; // UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
case 32768:
diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php
index 58910e3f..14b42f2c 100644
--- a/src/PhpSpreadsheet/Shared/Date.php
+++ b/src/PhpSpreadsheet/Shared/Date.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Shared;
/**
- * PHPExcel_Shared_Date
+ * \PHPExcel\Shared\Date
*
* Copyright (c) 2006 - 2015 PHPExcel
*
diff --git a/src/PhpSpreadsheet/Shared/Escher.php b/src/PhpSpreadsheet/Shared/Escher.php
index b9039a16..49316ff6 100644
--- a/src/PhpSpreadsheet/Shared/Escher.php
+++ b/src/PhpSpreadsheet/Shared/Escher.php
@@ -32,7 +32,7 @@ class Escher
/**
* Drawing Group Container
*
- * @var Escher\DggContainer
+ * @var \DggContainer
*/
private $dggContainer;
diff --git a/src/PhpSpreadsheet/Shared/Escher/DgContainer.php b/src/PhpSpreadsheet/Shared/Escher/DgContainer.php
index ebdd1cae..85901a5d 100644
--- a/src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+++ b/src/PhpSpreadsheet/Shared/Escher/DgContainer.php
@@ -1,6 +1,6 @@
m, $nx);
} else {
- throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException));
+ throw new \PHPExcel\Calculation\Exception(JAMAError(MatrixSPDException));
}
} else {
- throw new PHPExcel_Calculation_Exception(JAMAError(MATRIX_DIMENSION_EXCEPTION));
+ throw new \PHPExcel\Calculation\Exception(JAMAError(MATRIX_DIMENSION_EXCEPTION));
}
} else {
- throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION));
+ throw new \PHPExcel\Calculation\Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION));
}
} // function solve()
}
diff --git a/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php
index d4ae3979..bcecfdd4 100644
--- a/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php
+++ b/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php
@@ -1,4 +1,7 @@
LU = $A->getArray();
$this->m = $A->getRowDimension();
@@ -115,7 +118,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
}
}
} else {
- throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(Matrix::ARGUMENT_TYPE_EXCEPTION);
}
} // function __construct()
@@ -137,7 +140,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
}
}
}
- return new PHPExcel_Shared_JAMA_Matrix($L);
+ return new Matrix($L);
} // function getL()
/**
@@ -156,7 +159,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
}
}
}
- return new PHPExcel_Shared_JAMA_Matrix($U);
+ return new Matrix($U);
} // function getU()
/**
@@ -208,7 +211,7 @@ class PHPExcel_Shared_JAMA_LUDecomposition
}
return $d;
} else {
- throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(Matrix::MATRIX_DIMENSION_EXCEPTION);
}
} // function det()
@@ -217,8 +220,8 @@ class PHPExcel_Shared_JAMA_LUDecomposition
*
* @param $B A Matrix with as many rows as A and any number of columns.
* @return X so that L*U*X = B(piv,:)
- * @PHPExcel_Calculation_Exception IllegalArgumentException Matrix row dimensions must agree.
- * @PHPExcel_Calculation_Exception RuntimeException Matrix is singular.
+ * @\PHPExcel\Calculation\Exception IllegalArgumentException Matrix row dimensions must agree.
+ * @\PHPExcel\Calculation\Exception RuntimeException Matrix is singular.
*/
public function solve($B)
{
@@ -248,10 +251,10 @@ class PHPExcel_Shared_JAMA_LUDecomposition
}
return $X;
} else {
- throw new PHPExcel_Calculation_Exception(self::MATRIX_SINGULAR_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::MATRIX_SINGULAR_EXCEPTION);
}
} else {
- throw new PHPExcel_Calculation_Exception(self::MATRIX_SQUARE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::MATRIX_SQUARE_EXCEPTION);
}
}
}
diff --git a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php
index 82fb0fb2..9158de25 100644
--- a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+++ b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php
@@ -1,17 +1,6 @@
= 0) {
$m = $this->m - $i0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if ($j0 >= 0) {
$n = $this->n - $j0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
+ $R = new Matrix($m, $n);
for ($i = $i0; $i < $this->m; ++$i) {
for ($j = $j0; $j < $this->n; ++$j) {
$R->set($i, $j, $this->A[$i][$j]);
@@ -200,14 +189,14 @@ class PHPExcel_Shared_JAMA_Matrix
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
+ $R = new Matrix($m+1, $n+1);
for ($i = $i0; $i <= $iF; ++$i) {
for ($j = $j0; $j <= $jF; ++$j) {
$R->set($i - $i0, $j - $j0, $this->A[$i][$j]);
@@ -221,14 +210,14 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) {
$m = count($RL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
+ $R = new Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) {
for ($j = 0; $j < $n; ++$j) {
$R->set($i - $i0, $j - $j0, $this->A[$RL[$i]][$CL[$j]]);
@@ -242,14 +231,14 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) {
$m = count($RL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
+ $R = new Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) {
for ($j = 0; $j < $n; ++$j) {
$R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]);
@@ -263,14 +252,14 @@ class PHPExcel_Shared_JAMA_Matrix
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
$m = $iF - $i0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if (count($CL) > 0) {
$n = count($CL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
+ $R = new Matrix($m, $n);
for ($i = $i0; $i < $iF; ++$i) {
for ($j = 0; $j < $n; ++$j) {
$R->set($i - $i0, $j, $this->A[$RL[$i]][$j]);
@@ -284,14 +273,14 @@ class PHPExcel_Shared_JAMA_Matrix
if (count($RL) > 0) {
$m = count($RL);
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
$n = $jF - $j0;
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_BOUNDS_EXCEPTION);
}
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
+ $R = new Matrix($m, $n+1);
for ($i = 0; $i < $m; ++$i) {
for ($j = $j0; $j <= $jF; ++$j) {
$R->set($i, $j - $j0, $this->A[$RL[$i]][$j]);
@@ -300,11 +289,11 @@ class PHPExcel_Shared_JAMA_Matrix
return $R;
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -317,14 +306,14 @@ class PHPExcel_Shared_JAMA_Matrix
*/
public function checkMatrixDimensions($B = null)
{
- if ($B instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($B instanceof Matrix) {
if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) {
return true;
} else {
- throw new PHPExcel_Calculation_Exception(self::MATRIX_DIMENSION_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::MATRIX_DIMENSION_EXCEPTION);
}
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
} // function checkMatrixDimensions()
@@ -367,7 +356,7 @@ class PHPExcel_Shared_JAMA_Matrix
*/
public function diagonal($m = null, $n = null, $c = 1)
{
- $R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
+ $R = new Matrix($m, $n);
for ($i = 0; $i < $m; ++$i) {
$R->set($i, $i, $c);
}
@@ -391,7 +380,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $this->getMatrix($i0, 0, $i0 + 1, $this->n);
}
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
}
@@ -412,7 +401,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $this->getMatrix(0, $j0, $this->m, $j0 + 1);
}
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
}
@@ -424,7 +413,7 @@ class PHPExcel_Shared_JAMA_Matrix
*/
public function transpose()
{
- $R = new PHPExcel_Shared_JAMA_Matrix($this->n, $this->m);
+ $R = new Matrix($this->n, $this->m);
for ($i = 0; $i < $this->m; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
$R->set($j, $i, $this->A[$i][$j]);
@@ -474,17 +463,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -495,7 +484,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -514,17 +503,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -534,11 +523,11 @@ class PHPExcel_Shared_JAMA_Matrix
$value = $M->get($i, $j);
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($this->A[$i][$j]);
}
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
$value = trim($value, '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($value);
}
if ($validValues) {
$this->A[$i][$j] += $value;
@@ -549,7 +538,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $this;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -568,17 +557,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -589,7 +578,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -608,17 +597,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -628,11 +617,11 @@ class PHPExcel_Shared_JAMA_Matrix
$value = $M->get($i, $j);
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($this->A[$i][$j]);
}
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
$value = trim($value, '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($value);
}
if ($validValues) {
$this->A[$i][$j] -= $value;
@@ -643,7 +632,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $this;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -663,17 +652,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -684,7 +673,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -704,17 +693,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -724,11 +713,11 @@ class PHPExcel_Shared_JAMA_Matrix
$value = $M->get($i, $j);
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($this->A[$i][$j]);
}
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
$value = trim($value, '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($value);
}
if ($validValues) {
$this->A[$i][$j] *= $value;
@@ -739,7 +728,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $this;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -759,17 +748,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -779,11 +768,11 @@ class PHPExcel_Shared_JAMA_Matrix
$value = $M->get($i, $j);
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($this->A[$i][$j]);
}
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
$value = trim($value, '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($value);
}
if ($validValues) {
if ($value == 0) {
@@ -799,7 +788,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -820,17 +809,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -841,7 +830,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -862,17 +851,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -883,7 +872,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -904,17 +893,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -925,7 +914,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $M;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -945,13 +934,13 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$B = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
if ($this->n == $B->m) {
- $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
+ $C = new Matrix($this->m, $B->n);
for ($j = 0; $j < $B->n; ++$j) {
for ($k = 0; $k < $this->n; ++$k) {
$Bcolj[$k] = $B->A[$k][$j];
@@ -967,13 +956,13 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $C;
} else {
- throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch));
+ throw new \PHPExcel\Calculation\Exception(JAMAError(MatrixDimensionMismatch));
}
break;
case 'array':
- $B = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $B = new Matrix($args[0]);
if ($this->n == $B->m) {
- $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n);
+ $C = new Matrix($this->m, $B->n);
for ($i = 0; $i < $C->m; ++$i) {
for ($j = 0; $j < $C->n; ++$j) {
$s = "0";
@@ -985,12 +974,12 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $C;
} else {
- throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch));
+ throw new \PHPExcel\Calculation\Exception(JAMAError(MatrixDimensionMismatch));
}
return $M;
break;
case 'integer':
- $C = new PHPExcel_Shared_JAMA_Matrix($this->A);
+ $C = new Matrix($this->A);
for ($i = 0; $i < $C->m; ++$i) {
for ($j = 0; $j < $C->n; ++$j) {
$C->A[$i][$j] *= $args[0];
@@ -999,7 +988,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $C;
break;
case 'double':
- $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $this->n);
+ $C = new Matrix($this->m, $this->n);
for ($i = 0; $i < $C->m; ++$i) {
for ($j = 0; $j < $C->n; ++$j) {
$C->A[$i][$j] = $args[0] * $this->A[$i][$j];
@@ -1008,7 +997,7 @@ class PHPExcel_Shared_JAMA_Matrix
return $C;
break;
case 'float':
- $C = new PHPExcel_Shared_JAMA_Matrix($this->A);
+ $C = new Matrix($this->A);
for ($i = 0; $i < $C->m; ++$i) {
for ($j = 0; $j < $C->n; ++$j) {
$C->A[$i][$j] *= $args[0];
@@ -1017,11 +1006,11 @@ class PHPExcel_Shared_JAMA_Matrix
return $C;
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -1040,17 +1029,17 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
break;
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -1060,11 +1049,11 @@ class PHPExcel_Shared_JAMA_Matrix
$value = $M->get($i, $j);
if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) {
$this->A[$i][$j] = trim($this->A[$i][$j], '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($this->A[$i][$j]);
}
if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) {
$value = trim($value, '"');
- $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value);
+ $validValues &= \PHPExcel\Shared\String::convertToNumberIfFraction($value);
}
if ($validValues) {
$this->A[$i][$j] = pow($this->A[$i][$j], $value);
@@ -1075,7 +1064,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $this;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -1094,16 +1083,16 @@ class PHPExcel_Shared_JAMA_Matrix
switch ($match) {
case 'object':
- if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
+ if ($args[0] instanceof Matrix) {
$M = $args[0];
} else {
- throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::ARGUMENT_TYPE_EXCEPTION);
}
case 'array':
- $M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
+ $M = new Matrix($args[0]);
break;
default:
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
break;
}
$this->checkMatrixDimensions($M);
@@ -1114,7 +1103,7 @@ class PHPExcel_Shared_JAMA_Matrix
}
return $this;
} else {
- throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION);
}
}
@@ -1127,7 +1116,7 @@ class PHPExcel_Shared_JAMA_Matrix
public function solve($B)
{
if ($this->m == $this->n) {
- $LU = new PHPExcel_Shared_JAMA_LUDecomposition($this);
+ $LU = new LUDecomposition($this);
return $LU->solve($B);
} else {
$QR = new PHPExcel_Shared_JAMA_QRDecomposition($this);
@@ -1153,7 +1142,7 @@ class PHPExcel_Shared_JAMA_Matrix
*/
public function det()
{
- $L = new PHPExcel_Shared_JAMA_LUDecomposition($this);
+ $L = new LUDecomposition($this);
return $L->det();
}
}
diff --git a/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php
index 1e43c7c4..9178ce72 100644
--- a/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php
+++ b/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php
@@ -1,4 +1,7 @@
QR = $A->getArrayCopy();
$this->m = $A->getRowDimension();
@@ -89,7 +92,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition
$this->Rdiag[$k] = -$nrm;
}
} else {
- throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(Matrix::ARGUMENT_TYPE_EXCEPTION);
}
} // function __construct()
@@ -125,7 +128,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition
}
}
}
- return new PHPExcel_Shared_JAMA_Matrix($H);
+ return new Matrix($H);
} // function getH()
/**
@@ -146,7 +149,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition
}
}
}
- return new PHPExcel_Shared_JAMA_Matrix($R);
+ return new Matrix($R);
} // function getR()
/**
@@ -183,7 +186,7 @@ class PHPExcel_Shared_JAMA_QRDecomposition
}
}
*/
- return new PHPExcel_Shared_JAMA_Matrix($Q);
+ return new Matrix($Q);
} // function getQ()
/**
@@ -223,13 +226,13 @@ class PHPExcel_Shared_JAMA_QRDecomposition
}
}
}
- $X = new PHPExcel_Shared_JAMA_Matrix($X);
+ $X = new Matrix($X);
return ($X->getMatrix(0, $this->n-1, 0, $nx));
} else {
- throw new PHPExcel_Calculation_Exception(self::MATRIX_RANK_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(self::MATRIX_RANK_EXCEPTION);
}
} else {
- throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION);
+ throw new \PHPExcel\Calculation\Exception(Matrix::MATRIX_DIMENSION_EXCEPTION);
}
}
}
diff --git a/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php
index f57d122c..b25a7708 100644
--- a/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php
+++ b/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php
@@ -1,4 +1,7 @@
zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING);
$contents = '';
if ((is_array($extracted)) && ($extracted != 0)) {
diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php
index a2d27a23..eee9245e 100644
--- a/src/PhpSpreadsheet/Spreadsheet.php
+++ b/src/PhpSpreadsheet/Spreadsheet.php
@@ -238,7 +238,7 @@ class Spreadsheet
{
$returnData = null;
$what = strtolower($what);
- switch ($what){
+ switch ($what) {
case 'all':
$returnData = $this->ribbonXMLData;
break;
@@ -282,7 +282,7 @@ class Spreadsheet
{
$ReturnData = null;
$What = strtolower($What);
- switch($What) {
+ switch ($What) {
case 'all':
return $this->ribbonBinObjects;
break;
diff --git a/src/PhpSpreadsheet/Style/NumberFormat.php b/src/PhpSpreadsheet/Style/NumberFormat.php
index c199fffd..13a23b3e 100644
--- a/src/PhpSpreadsheet/Style/NumberFormat.php
+++ b/src/PhpSpreadsheet/Style/NumberFormat.php
@@ -447,11 +447,13 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
'h' => 'g'
);
- private static function setLowercaseCallback($matches) {
+ private static function setLowercaseCallback($matches)
+ {
return mb_strtolower($matches[0]);
}
- private static function escapeQuotesCallback($matches) {
+ private static function escapeQuotesCallback($matches)
+ {
return '\\' . implode('\\', str_split($matches[1]));
}
@@ -468,7 +470,7 @@ class NumberFormat extends Supervisor implements \PHPExcel\IComparable
// Only process the non-quoted blocks for date format characters
$blocks = explode('"', $format);
- foreach($blocks as $key => &$block) {
+ foreach ($blocks as $key => &$block) {
if ($key % 2 == 0) {
$block = strtr($block, self::$dateFormatReplacements);
if (!strpos($block, 'A')) {
diff --git a/src/PhpSpreadsheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet.php
index 835bef52..c57df5db 100644
--- a/src/PhpSpreadsheet/Worksheet.php
+++ b/src/PhpSpreadsheet/Worksheet.php
@@ -22,7 +22,7 @@ namespace PHPExcel;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
@@ -1506,7 +1506,7 @@ class Worksheet implements IComparable
*
* Please note that this will overwrite existing cell styles for cells in range!
*
- * @deprecated
+ * @deprecated duplicateStyle
* @param Style $pSharedCellStyle Cell style to share
* @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
* @throws Exception
diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/src/PhpSpreadsheet/Worksheet/AutoFilter.php
index d67e5c3a..42323c27 100644
--- a/src/PhpSpreadsheet/Worksheet/AutoFilter.php
+++ b/src/PhpSpreadsheet/Worksheet/AutoFilter.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_AutoFilter
+ * \PHPExcel\Worksheet\AutoFilter
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php
index 08707bd6..f33c15bf 100644
--- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php
+++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet\AutoFilter;
/**
- * PHPExcel_Worksheet_AutoFilter_Column
+ * \PHPExcel\Worksheet\AutoFilter\Column
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet\AutoFilter;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
index ed97c418..703d9e72 100644
--- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet\AutoFilter\Column;
/**
- * PHPExcel_Worksheet_AutoFilter_Column_Rule
+ * \PHPExcel\Worksheet\AutoFilter\Column\Rule
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet\AutoFilter\Column;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php
index 05e381e3..f2e9ee77 100644
--- a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php
+++ b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_BaseDrawing
+ * \PHPExcel\Worksheet_BaseDrawing
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/CellIterator.php b/src/PhpSpreadsheet/Worksheet/CellIterator.php
index dfdc5239..7478d25a 100644
--- a/src/PhpSpreadsheet/Worksheet/CellIterator.php
+++ b/src/PhpSpreadsheet/Worksheet/CellIterator.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_CellIterator
+ * \PHPExcel\Worksheet_CellIterator
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/Column.php b/src/PhpSpreadsheet/Worksheet/Column.php
index 7329936c..1ab7bde0 100644
--- a/src/PhpSpreadsheet/Worksheet/Column.php
+++ b/src/PhpSpreadsheet/Worksheet/Column.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_Column
+ * \PHPExcel\Worksheet\Column
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
index 3c2bc872..9fc55258 100644
--- a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
+++ b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_ColumnCellIterator
+ * \PHPExcel\Worksheet\ColumnCellIterator
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php
index b759488b..889b86fb 100644
--- a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php
+++ b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_ColumnDimension
+ * \PHPExcel\Worksheet\ColumnDimension
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
index a8e82914..e1e41f60 100644
--- a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
+++ b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php
@@ -2,8 +2,11 @@
namespace PHPExcel\Worksheet;
+use PHPExcel\Cell;
+use PHPExcel\Exception;
+
/**
- * PHPExcel_Worksheet_ColumnIterator
+ * \PHPExcel\Worksheet\ColumnIterator
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +25,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
@@ -87,13 +90,13 @@ class ColumnIterator implements \Iterator
*
* @param integer $startColumn The column address at which to start iterating
* @return ColumnIterator
- * @throws PHPExcel_Exception
+ * @throws Exception
*/
public function resetStart($startColumn = 'A')
{
$startColumnIndex = \PHPExcel\Cell::columnIndexFromString($startColumn) - 1;
- if ($startColumnIndex > PHPExcel_Cell::columnIndexFromString($this->subject->getHighestColumn()) - 1) {
- throw new PHPExcel_Exception("Start column ({$startColumn}) is beyond highest column ({$this->subject->getHighestColumn()})");
+ if ($startColumnIndex > Cell::columnIndexFromString($this->subject->getHighestColumn()) - 1) {
+ throw new Exception("Start column ({$startColumn}) is beyond highest column ({$this->subject->getHighestColumn()})");
}
$this->startColumn = $startColumnIndex;
diff --git a/src/PhpSpreadsheet/Worksheet/Dimension.php b/src/PhpSpreadsheet/Worksheet/Dimension.php
index 7b197e0c..eaec1fde 100644
--- a/src/PhpSpreadsheet/Worksheet/Dimension.php
+++ b/src/PhpSpreadsheet/Worksheet/Dimension.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_Dimension
+ * \PHPExcel\Worksheet_Dimension
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/Drawing.php b/src/PhpSpreadsheet/Worksheet/Drawing.php
index 7ad76ef7..e494702d 100644
--- a/src/PhpSpreadsheet/Worksheet/Drawing.php
+++ b/src/PhpSpreadsheet/Worksheet/Drawing.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_Drawing
+ * \PHPExcel\Worksheet_Drawing
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet_Drawing
+ * @package \PHPExcel\Worksheet_Drawing
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php
index 3431af82..9335c7a7 100644
--- a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php
+++ b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet\Drawing;
/**
- * PHPExcel_Worksheet_Drawing_Shadow
+ * \PHPExcel\Worksheet_Drawing_Shadow
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet\Drawing;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet_Drawing
+ * @package \PHPExcel\Worksheet_Drawing
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php
index 557d201e..688ecc0b 100644
--- a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php
+++ b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_HeaderFooter
+ * \PHPExcel\Worksheet_HeaderFooter
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php b/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php
index a2453dfb..71ecc3cd 100644
--- a/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php
+++ b/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_HeaderFooterDrawing
+ * \PHPExcel\Worksheet_HeaderFooterDrawing
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php b/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php
index d4a2d7c8..b2fab11f 100644
--- a/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php
+++ b/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_MemoryDrawing
+ * \PHPExcel\Worksheet_MemoryDrawing
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/PageMargins.php b/src/PhpSpreadsheet/Worksheet/PageMargins.php
index 3cf69def..dc4fe3fd 100644
--- a/src/PhpSpreadsheet/Worksheet/PageMargins.php
+++ b/src/PhpSpreadsheet/Worksheet/PageMargins.php
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/PageSetup.php b/src/PhpSpreadsheet/Worksheet/PageSetup.php
index 7aea326b..ac8297a8 100644
--- a/src/PhpSpreadsheet/Worksheet/PageSetup.php
+++ b/src/PhpSpreadsheet/Worksheet/PageSetup.php
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
@@ -99,7 +99,7 @@ namespace PHPExcel\Worksheet;
*
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PageSetup
diff --git a/src/PhpSpreadsheet/Worksheet/Protection.php b/src/PhpSpreadsheet/Worksheet/Protection.php
index 87d5cd91..92f78bb6 100644
--- a/src/PhpSpreadsheet/Worksheet/Protection.php
+++ b/src/PhpSpreadsheet/Worksheet/Protection.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_Protection
+ * \PHPExcel\Worksheet_Protection
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/Row.php b/src/PhpSpreadsheet/Worksheet/Row.php
index ee73d8cc..d9e3f927 100644
--- a/src/PhpSpreadsheet/Worksheet/Row.php
+++ b/src/PhpSpreadsheet/Worksheet/Row.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_Row
+ * \PHPExcel\Worksheet\Row
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
index 223bbef8..41852348 100644
--- a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
+++ b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_RowCellIterator
+ * \PHPExcel\Worksheet\RowCellIterator
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/RowDimension.php b/src/PhpSpreadsheet/Worksheet/RowDimension.php
index a217784f..8bfa954c 100644
--- a/src/PhpSpreadsheet/Worksheet/RowDimension.php
+++ b/src/PhpSpreadsheet/Worksheet/RowDimension.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_RowDimension
+ * \PHPExcel\Worksheet\RowDimension
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/RowIterator.php b/src/PhpSpreadsheet/Worksheet/RowIterator.php
index 80c887f8..98ff0133 100644
--- a/src/PhpSpreadsheet/Worksheet/RowIterator.php
+++ b/src/PhpSpreadsheet/Worksheet/RowIterator.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_RowIterator
+ * \PHPExcel\Worksheet\RowIterator
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Worksheet/SheetView.php b/src/PhpSpreadsheet/Worksheet/SheetView.php
index d9b68c18..94cf641b 100644
--- a/src/PhpSpreadsheet/Worksheet/SheetView.php
+++ b/src/PhpSpreadsheet/Worksheet/SheetView.php
@@ -3,7 +3,7 @@
namespace PHPExcel\Worksheet;
/**
- * PHPExcel_Worksheet_SheetView
+ * \PHPExcel\Worksheet_SheetView
*
* Copyright (c) 2006 - 2015 PHPExcel
*
@@ -22,7 +22,7 @@ namespace PHPExcel\Worksheet;
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
- * @package PHPExcel_Worksheet
+ * @package \PHPExcel\Worksheet
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php
index 35a36a5e..507f46b7 100644
--- a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php
+++ b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php
@@ -1,6 +1,15 @@
calculateCellValues = $calculateCellValues;
@@ -112,12 +121,12 @@ class Chart extends WriterPart
/**
* Write Chart Title
*
- * @param PHPExcel_Chart_Title $title
+ * @param Title $title
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeTitle(PHPExcel_Chart_Title $title = null, $objWriter)
+ private function writeTitle(Title $title = null, $objWriter)
{
if (is_null($title)) {
return;
@@ -157,12 +166,12 @@ class Chart extends WriterPart
/**
* Write Chart Legend
*
- * @param PHPExcel_Chart_Legend $legend
+ * @param Legend $legend
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter)
+ private function writeLegend(Legend $legend = null, $objWriter)
{
if (is_null($legend)) {
return;
@@ -208,16 +217,16 @@ class Chart extends WriterPart
/**
* Write Chart Plot Area
*
- * @param PHPExcel_Chart_PlotArea $plotArea
- * @param PHPExcel_Chart_Title $xAxisLabel
- * @param PHPExcel_Chart_Title $yAxisLabel
- * @param PHPExcel_Chart_Axis $xAxis
- * @param PHPExcel_Chart_Axis $yAxis
+ * @param PlotArea $plotArea
+ * @param Title $xAxisLabel
+ * @param Title $yAxisLabel
+ * @param Axis $xAxis
+ * @param Axis $yAxis
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writePlotArea(PHPExcel_Chart_PlotArea $plotArea, PHPExcel_Chart_Title $xAxisLabel = null, PHPExcel_Chart_Title $yAxisLabel = null, $objWriter, \PHPExcel\Worksheet $pSheet, PHPExcel_Chart_Axis $xAxis, PHPExcel_Chart_Axis $yAxis, PHPExcel_Chart_GridLines $majorGridlines, PHPExcel_Chart_GridLines $minorGridlines)
+ private function writePlotArea(PlotArea $plotArea, Title $xAxisLabel = null, Title $yAxisLabel = null, $objWriter, \PHPExcel\Worksheet $pSheet, Axis $xAxis, Axis $yAxis, GridLines $majorGridlines, GridLines $minorGridlines)
{
if (is_null($plotArea)) {
return;
@@ -243,11 +252,11 @@ class Chart extends WriterPart
$groupType = $plotGroup->getPlotType();
if ($groupType == $chartType) {
$plotStyle = $plotGroup->getPlotStyle();
- if ($groupType === PHPExcel_Chart_DataSeries::TYPE_RADARCHART) {
+ if ($groupType === DataSeries::TYPE_RADARCHART) {
$objWriter->startElement('c:radarStyle');
$objWriter->writeAttribute('val', $plotStyle);
$objWriter->endElement();
- } elseif ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART) {
+ } elseif ($groupType === DataSeries::TYPE_SCATTERCHART) {
$objWriter->startElement('c:scatterStyle');
$objWriter->writeAttribute('val', $plotStyle);
$objWriter->endElement();
@@ -259,13 +268,13 @@ class Chart extends WriterPart
$this->writeDataLabels($objWriter, $layout);
- if ($chartType === PHPExcel_Chart_DataSeries::TYPE_LINECHART) {
+ if ($chartType === DataSeries::TYPE_LINECHART) {
// Line only, Line3D can't be smoothed
$objWriter->startElement('c:smooth');
$objWriter->writeAttribute('val', (integer) $plotGroup->getSmoothLine());
$objWriter->endElement();
- } elseif (($chartType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) ||($chartType === PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D)) {
+ } elseif (($chartType === DataSeries::TYPE_BARCHART) ||($chartType === DataSeries::TYPE_BARCHART_3D)) {
$objWriter->startElement('c:gapWidth');
$objWriter->writeAttribute('val', 150);
$objWriter->endElement();
@@ -275,7 +284,7 @@ class Chart extends WriterPart
$objWriter->writeAttribute('val', 100);
$objWriter->endElement();
}
- } elseif ($chartType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
+ } elseif ($chartType === DataSeries::TYPE_BUBBLECHART) {
$objWriter->startElement('c:bubbleScale');
$objWriter->writeAttribute('val', 25);
$objWriter->endElement();
@@ -283,7 +292,7 @@ class Chart extends WriterPart
$objWriter->startElement('c:showNegBubbles');
$objWriter->writeAttribute('val', 0);
$objWriter->endElement();
- } elseif ($chartType === PHPExcel_Chart_DataSeries::TYPE_STOCKCHART) {
+ } elseif ($chartType === DataSeries::TYPE_STOCKCHART) {
$objWriter->startElement('c:hiLowLines');
$objWriter->endElement();
@@ -310,7 +319,7 @@ class Chart extends WriterPart
$id1 = '75091328';
$id2 = '75089408';
- if (($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
+ if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) {
$objWriter->startElement('c:axId');
$objWriter->writeAttribute('val', $id1);
$objWriter->endElement();
@@ -322,7 +331,7 @@ class Chart extends WriterPart
$objWriter->writeAttribute('val', 0);
$objWriter->endElement();
- if ($chartType === PHPExcel_Chart_DataSeries::TYPE_DONUTCHART) {
+ if ($chartType === DataSeries::TYPE_DONUTCHART) {
$objWriter->startElement('c:holeSize');
$objWriter->writeAttribute('val', 50);
$objWriter->endElement();
@@ -332,8 +341,8 @@ class Chart extends WriterPart
$objWriter->endElement();
}
- if (($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
- if ($chartType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
+ if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) {
+ if ($chartType === DataSeries::TYPE_BUBBLECHART) {
$this->writeValueAxis($objWriter, $plotArea, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines);
} else {
$this->writeCategoryAxis($objWriter, $plotArea, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $yAxis);
@@ -349,7 +358,7 @@ class Chart extends WriterPart
* Write Data Labels
*
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
- * @param PHPExcel_Chart_Layout $chartLayout Chart layout
+ * @param \PHPExcel\Chart\Layout $chartLayout Chart layout
*
* @throws \PHPExcel\Writer\Exception
*/
@@ -399,7 +408,7 @@ class Chart extends WriterPart
* Write Category Axis
*
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
- * @param PHPExcel_Chart_PlotArea $plotArea
+ * @param PlotArea $plotArea
* @param PHPExcel_Chart_Title $xAxisLabel
* @param string $groupType Chart type
* @param string $id1
@@ -408,7 +417,7 @@ class Chart extends WriterPart
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeCategoryAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis)
+ private function writeCategoryAxis($objWriter, PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis)
{
$objWriter->startElement('c:catAx');
@@ -530,7 +539,7 @@ class Chart extends WriterPart
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeValueAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines)
+ private function writeValueAxis($objWriter, PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines)
{
$objWriter->startElement('c:valAx');
@@ -809,7 +818,7 @@ class Chart extends WriterPart
$objWriter->endElement();
$objWriter->endElement();
- if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
+ if ($groupType !== DataSeries::TYPE_BUBBLECHART) {
$layout = $yAxisLabel->getLayout();
$this->writeLayout($layout, $objWriter);
}
@@ -993,7 +1002,7 @@ class Chart extends WriterPart
}
if ($isMultiLevelSeries) {
- if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
+ if ($groupType !== DataSeries::TYPE_BUBBLECHART) {
$objWriter->startElement('c:noMultiLvlLbl');
$objWriter->writeAttribute('val', 0);
$objWriter->endElement();
@@ -1034,7 +1043,7 @@ class Chart extends WriterPart
/**
* Write Plot Group (series of related plots)
*
- * @param PHPExcel_Chart_DataSeries $plotGroup
+ * @param DataSeries $plotGroup
* @param string $groupType Type of plot for dataseries
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
* @param boolean &$catIsMultiLevelSeries Is category a multi-series category
@@ -1050,7 +1059,7 @@ class Chart extends WriterPart
return;
}
- if (($groupType == PHPExcel_Chart_DataSeries::TYPE_BARCHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D)) {
+ if (($groupType == DataSeries::TYPE_BARCHART) || ($groupType == DataSeries::TYPE_BARCHART_3D)) {
$objWriter->startElement('c:barDir');
$objWriter->writeAttribute('val', $plotGroup->getPlotDirection());
$objWriter->endElement();
@@ -1067,9 +1076,9 @@ class Chart extends WriterPart
$plotSeriesOrder = $plotGroup->getPlotOrder();
$plotSeriesCount = count($plotSeriesOrder);
- if (($groupType !== PHPExcel_Chart_DataSeries::TYPE_RADARCHART) && ($groupType !== PHPExcel_Chart_DataSeries::TYPE_STOCKCHART)) {
- if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_LINECHART) {
- if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) {
+ if (($groupType !== DataSeries::TYPE_RADARCHART) && ($groupType !== DataSeries::TYPE_STOCKCHART)) {
+ if ($groupType !== DataSeries::TYPE_LINECHART) {
+ if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) {
$objWriter->startElement('c:varyColors');
$objWriter->writeAttribute('val', 1);
$objWriter->endElement();
@@ -1092,7 +1101,7 @@ class Chart extends WriterPart
$objWriter->writeAttribute('val', $this->_seriesIndex + $plotSeriesRef);
$objWriter->endElement();
- if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
+ if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) {
$objWriter->startElement('c:dPt');
$objWriter->startElement('c:idx');
$objWriter->writeAttribute('val', 3);
@@ -1123,11 +1132,11 @@ class Chart extends WriterPart
}
// Formatting for the points
- if (($groupType == PHPExcel_Chart_DataSeries::TYPE_LINECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_STOCKCHART)) {
+ if (($groupType == DataSeries::TYPE_LINECHART) || ($groupType == DataSeries::TYPE_STOCKCHART)) {
$objWriter->startElement('c:spPr');
$objWriter->startElement('a:ln');
$objWriter->writeAttribute('w', 12700);
- if ($groupType == PHPExcel_Chart_DataSeries::TYPE_STOCKCHART) {
+ if ($groupType == DataSeries::TYPE_STOCKCHART) {
$objWriter->startElement('a:noFill');
$objWriter->endElement();
}
@@ -1154,7 +1163,7 @@ class Chart extends WriterPart
}
}
- if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART)) {
+ if (($groupType === DataSeries::TYPE_BARCHART) || ($groupType === DataSeries::TYPE_BARCHART_3D) || ($groupType === DataSeries::TYPE_BUBBLECHART)) {
$objWriter->startElement('c:invertIfNegative');
$objWriter->writeAttribute('val', 0);
$objWriter->endElement();
@@ -1165,7 +1174,7 @@ class Chart extends WriterPart
if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) {
$catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries();
- if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
+ if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) {
if (!is_null($plotGroup->getPlotStyle())) {
$plotStyle = $plotGroup->getPlotStyle();
if ($plotStyle) {
@@ -1176,13 +1185,13 @@ class Chart extends WriterPart
}
}
- if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART)) {
+ if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) {
$objWriter->startElement('c:xVal');
} else {
$objWriter->startElement('c:cat');
}
- $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str', $pSheet);
+ $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str');
$objWriter->endElement();
}
@@ -1190,18 +1199,18 @@ class Chart extends WriterPart
if ($plotSeriesValues) {
$valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries();
- if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART)) {
+ if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) {
$objWriter->startElement('c:yVal');
} else {
$objWriter->startElement('c:val');
}
- $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num', $pSheet);
+ $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num');
$objWriter->endElement();
}
- if ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
- $this->writeBubbles($plotSeriesValues, $objWriter, $pSheet);
+ if ($groupType === DataSeries::TYPE_BUBBLECHART) {
+ $this->writeBubbles($plotSeriesValues, $objWriter);
}
$objWriter->endElement();
@@ -1213,7 +1222,7 @@ class Chart extends WriterPart
/**
* Write Plot Series Label
*
- * @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel
+ * @param DataSeriesValues $plotSeriesLabel
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
@@ -1248,7 +1257,7 @@ class Chart extends WriterPart
/**
* Write Plot Series Values
*
- * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues
+ * @param DataSeriesValues $plotSeriesValues
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
* @param string $groupType Type of plot for dataseries
* @param string $dataType Datatype of series values
@@ -1256,7 +1265,7 @@ class Chart extends WriterPart
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType = 'str', \PHPExcel\Worksheet $pSheet)
+ private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType = 'str')
{
if (is_null($plotSeriesValues)) {
return;
@@ -1307,7 +1316,7 @@ class Chart extends WriterPart
$objWriter->startElement('c:' . $dataType . 'Cache');
- if (($groupType != PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($groupType != PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($groupType != PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
+ if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) {
if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) {
$objWriter->startElement('c:formatCode');
$objWriter->writeRawData($plotSeriesValues->getFormatCode());
@@ -1343,12 +1352,12 @@ class Chart extends WriterPart
/**
* Write Bubble Chart Details
*
- * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues
+ * @param DataSeriesValues $plotSeriesValues
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeBubbles($plotSeriesValues, $objWriter, \PHPExcel\Worksheet $pSheet)
+ private function writeBubbles($plotSeriesValues, $objWriter)
{
if (is_null($plotSeriesValues)) {
return;
@@ -1390,12 +1399,12 @@ class Chart extends WriterPart
/**
* Write Layout
*
- * @param PHPExcel_Chart_Layout $layout
+ * @param Layout $layout
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
*
* @throws \PHPExcel\Writer\Exception
*/
- private function writeLayout(PHPExcel_Chart_Layout $layout = null, $objWriter)
+ private function writeLayout(Layout $layout = null, $objWriter)
{
$objWriter->startElement('c:layout');
diff --git a/src/PhpSpreadsheet/Writer/Excel2007/ContentTypes.php b/src/PhpSpreadsheet/Writer/Excel2007/ContentTypes.php
index 7eb7bbcf..aeb2e94c 100644
--- a/src/PhpSpreadsheet/Writer/Excel2007/ContentTypes.php
+++ b/src/PhpSpreadsheet/Writer/Excel2007/ContentTypes.php
@@ -146,7 +146,7 @@ class ContentTypes extends WriterPart
$mimeType = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType();
}
- if (!isset( $aMediaContentTypes[$extension])) {
+ if (!isset($aMediaContentTypes[$extension])) {
$aMediaContentTypes[$extension] = $mimeType;
$this->writeDefaultContentType($objWriter, $extension, $mimeType);
@@ -165,7 +165,7 @@ class ContentTypes extends WriterPart
for ($i = 0; $i < $sheetCount; ++$i) {
if (count($pPHPExcel->getSheet()->getHeaderFooter()->getImages()) > 0) {
foreach ($pPHPExcel->getSheet()->getHeaderFooter()->getImages() as $image) {
- if (!isset( $aMediaContentTypes[strtolower($image->getExtension())])) {
+ if (!isset($aMediaContentTypes[strtolower($image->getExtension())])) {
$aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath());
$this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]);
diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Drawing.php b/src/PhpSpreadsheet/Writer/Excel2007/Drawing.php
index 7e3c3126..0573b46b 100644
--- a/src/PhpSpreadsheet/Writer/Excel2007/Drawing.php
+++ b/src/PhpSpreadsheet/Writer/Excel2007/Drawing.php
@@ -1,5 +1,6 @@
getTopLeftPosition();
$tl['colRow'] = \PHPExcel\Cell::coordinateFromString($tl['cell']);
diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Theme.php b/src/PhpSpreadsheet/Writer/Excel2007/Theme.php
index 433f8d64..336edfd2 100644
--- a/src/PhpSpreadsheet/Writer/Excel2007/Theme.php
+++ b/src/PhpSpreadsheet/Writer/Excel2007/Theme.php
@@ -1,5 +1,7 @@
getParentWriter()->getUseDiskCaching()) {
$objWriter = new \PHPExcel\Shared\XMLWriter(\PHPExcel\Shared\XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
} else {
@@ -90,7 +89,7 @@ class Workbook extends WriterPart
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
* @throws \PHPExcel\Writer\Exception
*/
- private function writeFileVersion(\PHPExcel\Shared\XMLWriter $objWriter = null)
+ private function writeFileVersion(\PHPExcel\Shared\XMLWriter $objWriter)
{
$objWriter->startElement('fileVersion');
$objWriter->writeAttribute('appName', 'xl');
@@ -106,7 +105,7 @@ class Workbook extends WriterPart
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
* @throws \PHPExcel\Writer\Exception
*/
- private function writeWorkbookPr(\PHPExcel\Shared\XMLWriter $objWriter = null)
+ private function writeWorkbookPr(\PHPExcel\Shared\XMLWriter $objWriter)
{
$objWriter->startElement('workbookPr');
@@ -126,7 +125,7 @@ class Workbook extends WriterPart
* @param PHPExcel $pPHPExcel
* @throws \PHPExcel\Writer\Exception
*/
- private function writeBookViews(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\SpreadSheet $pPHPExcel = null)
+ private function writeBookViews(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\SpreadSheet $pPHPExcel = null)
{
// bookViews
$objWriter->startElement('bookViews');
@@ -156,7 +155,7 @@ class Workbook extends WriterPart
* @param PHPExcel $pPHPExcel
* @throws \PHPExcel\Writer\Exception
*/
- private function writeWorkbookProtection(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\SpreadSheet $pPHPExcel = null)
+ private function writeWorkbookProtection(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\SpreadSheet $pPHPExcel = null)
{
if ($pPHPExcel->getSecurity()->isSecurityEnabled()) {
$objWriter->startElement('workbookProtection');
@@ -183,7 +182,7 @@ class Workbook extends WriterPart
* @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing
* @throws \PHPExcel\Writer\Exception
*/
- private function writeCalcPr(\PHPExcel\Shared\XMLWriter $objWriter = null, $recalcRequired = true)
+ private function writeCalcPr(\PHPExcel\Shared\XMLWriter $objWriter, $recalcRequired = true)
{
$objWriter->startElement('calcPr');
@@ -206,7 +205,7 @@ class Workbook extends WriterPart
* @param PHPExcel $pPHPExcel
* @throws \PHPExcel\Writer\Exception
*/
- private function writeSheets(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\SpreadSheet $pPHPExcel = null)
+ private function writeSheets(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\SpreadSheet $pPHPExcel = null)
{
// Write sheets
$objWriter->startElement('sheets');
@@ -235,7 +234,7 @@ class Workbook extends WriterPart
* @param string $sheetState Sheet state (visible, hidden, veryHidden)
* @throws \PHPExcel\Writer\Exception
*/
- private function writeSheet(\PHPExcel\Shared\XMLWriter $objWriter = null, $pSheetname = '', $pSheetId = 1, $pRelId = 1, $sheetState = 'visible')
+ private function writeSheet(\PHPExcel\Shared\XMLWriter $objWriter, $pSheetname = '', $pSheetId = 1, $pRelId = 1, $sheetState = 'visible')
{
if ($pSheetname != '') {
// Write sheet
@@ -259,7 +258,7 @@ class Workbook extends WriterPart
* @param PHPExcel $pPHPExcel
* @throws \PHPExcel\Writer\Exception
*/
- private function writeDefinedNames(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\SpreadSheet $pPHPExcel = null)
+ private function writeDefinedNames(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\SpreadSheet $pPHPExcel = null)
{
// Write defined names
$objWriter->startElement('definedNames');
@@ -290,10 +289,10 @@ class Workbook extends WriterPart
* Write named ranges
*
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
- * @param PHPExcel $pPHPExcel
+ * @param \PHPExcel\SpreadSheet $pPHPExcel
* @throws \PHPExcel\Writer\Exception
*/
- private function writeNamedRanges(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\SpreadSheet $pPHPExcel)
+ private function writeNamedRanges(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\SpreadSheet $pPHPExcel)
{
// Loop named ranges
$namedRanges = $pPHPExcel->getNamedRanges();
@@ -306,10 +305,10 @@ class Workbook extends WriterPart
* Write Defined Name for named range
*
* @param \PHPExcel\Shared\XMLWriter $objWriter XML Writer
- * @param PHPExcel_NamedRange $pNamedRange
+ * @param \PHPExcel\NamedRange $pNamedRange
* @throws \PHPExcel\Writer\Exception
*/
- private function writeDefinedNameForNamedRange(\PHPExcel\Shared\XMLWriter $objWriter = null, PHPExcel_NamedRange $pNamedRange)
+ private function writeDefinedNameForNamedRange(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\NamedRange $pNamedRange)
{
// definedName for named range
$objWriter->startElement('definedName');
@@ -341,7 +340,7 @@ class Workbook extends WriterPart
* @param int $pSheetId
* @throws \PHPExcel\Writer\Exception
*/
- private function writeDefinedNameForAutofilter(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
+ private function writeDefinedNameForAutofilter(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
{
// definedName for autoFilter
$autoFilterRange = $pSheet->getAutoFilter()->getRange();
@@ -377,7 +376,7 @@ class Workbook extends WriterPart
* @param int $pSheetId
* @throws \PHPExcel\Writer\Exception
*/
- private function writeDefinedNameForPrintTitles(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
+ private function writeDefinedNameForPrintTitles(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
{
// definedName for PrintTitles
if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) {
@@ -420,7 +419,7 @@ class Workbook extends WriterPart
* @param int $pSheetId
* @throws \PHPExcel\Writer\Exception
*/
- private function writeDefinedNameForPrintArea(\PHPExcel\Shared\XMLWriter $objWriter = null, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
+ private function writeDefinedNameForPrintArea(\PHPExcel\Shared\XMLWriter $objWriter, \PHPExcel\Worksheet $pSheet = null, $pSheetId = 0)
{
// definedName for PrintArea
if ($pSheet->getPageSetup()->isPrintAreaSet()) {
diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Worksheet.php b/src/PhpSpreadsheet/Writer/Excel2007/Worksheet.php
index ae50fd26..2eacf606 100644
--- a/src/PhpSpreadsheet/Writer/Excel2007/Worksheet.php
+++ b/src/PhpSpreadsheet/Writer/Excel2007/Worksheet.php
@@ -1,5 +1,6 @@
phpExcel = $phpExcel;
$this->defaultFont = $this->phpExcel->getDefaultStyle()->getFont();
@@ -147,10 +154,10 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
// garbage collect
$this->phpExcel->garbageCollect();
- $saveDebugLog = PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog();
- PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false);
- $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
- PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
+ $saveDebugLog = Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog();
+ Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false);
+ $saveArrayReturnType = Calculation::getArrayReturnType();
+ Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE);
// Build CSS
$this->buildCSS(!$this->useInlineCss);
@@ -178,8 +185,8 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
// Close file
fclose($fileHandle);
- PHPExcel_Calculation::setArrayReturnType($saveArrayReturnType);
- PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog);
+ Calculation::setArrayReturnType($saveArrayReturnType);
+ Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog);
}
/**
@@ -285,7 +292,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
* Set sheet index
*
* @param int $pValue Sheet index
- * @return PHPExcel_Writer_HTML
+ * @return HTML
*/
public function setSheetIndex($pValue = 0)
{
@@ -307,7 +314,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
* Set sheet index
*
* @param boolean $pValue Flag indicating whether the sheet navigation block should be generated or not
- * @return PHPExcel_Writer_HTML
+ * @return HTML
*/
public function setGenerateSheetNavigationBlock($pValue = true)
{
@@ -421,10 +428,10 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
// Get worksheet dimension
$dimension = explode(':', $sheet->calculateWorksheetDimension());
- $dimension[0] = PHPExcel_Cell::coordinateFromString($dimension[0]);
- $dimension[0][0] = PHPExcel_Cell::columnIndexFromString($dimension[0][0]) - 1;
- $dimension[1] = PHPExcel_Cell::coordinateFromString($dimension[1]);
- $dimension[1][0] = PHPExcel_Cell::columnIndexFromString($dimension[1][0]) - 1;
+ $dimension[0] = \PHPExcel\Cell::coordinateFromString($dimension[0]);
+ $dimension[0][0] = \PHPExcel\Cell::columnIndexFromString($dimension[0][0]) - 1;
+ $dimension[1] = \PHPExcel\Cell::coordinateFromString($dimension[1]);
+ $dimension[1][0] = \PHPExcel\Cell::columnIndexFromString($dimension[1][0]) - 1;
// row min,max
$rowMin = $dimension[0][1];
@@ -468,7 +475,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
while ($column++ < $dimension[1][0]) {
// Cell exists?
if ($sheet->cellExistsByColumnAndRow($column, $row)) {
- $rowData[$column] = PHPExcel_Cell::stringFromColumnIndex($column) . $row;
+ $rowData[$column] = \PHPExcel\Cell::stringFromColumnIndex($column) . $row;
} else {
$rowData[$column] = '';
}
@@ -553,11 +560,11 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
foreach ($pSheet->getChartCollection() as $chart) {
if ($chart instanceof PHPExcel_Chart) {
$chartCoordinates = $chart->getTopLeftPosition();
- $chartTL = PHPExcel_Cell::coordinateFromString($chartCoordinates['cell']);
- $chartCol = PHPExcel_Cell::columnIndexFromString($chartTL[0]);
+ $chartTL = \PHPExcel\Cell::coordinateFromString($chartCoordinates['cell']);
+ $chartCol = \PHPExcel\Cell::columnIndexFromString($chartTL[0]);
if ($chartTL[1] > $rowMax) {
$rowMax = $chartTL[1];
- if ($chartCol > PHPExcel_Cell::columnIndexFromString($colMax)) {
+ if ($chartCol > \PHPExcel\Cell::columnIndexFromString($colMax)) {
$colMax = $chartTL[0];
}
}
@@ -567,11 +574,11 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
foreach ($pSheet->getDrawingCollection() as $drawing) {
if ($drawing instanceof \PHPExcel\Worksheet\Drawing) {
- $imageTL = PHPExcel_Cell::coordinateFromString($drawing->getCoordinates());
- $imageCol = PHPExcel_Cell::columnIndexFromString($imageTL[0]);
+ $imageTL = \PHPExcel\Cell::coordinateFromString($drawing->getCoordinates());
+ $imageCol = \PHPExcel\Cell::columnIndexFromString($imageTL[0]);
if ($imageTL[1] > $rowMax) {
$rowMax = $imageTL[1];
- if ($imageCol > PHPExcel_Cell::columnIndexFromString($colMax)) {
+ if ($imageCol > \PHPExcel\Cell::columnIndexFromString($colMax)) {
$colMax = $imageTL[0];
}
}
@@ -854,7 +861,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
$sheet->calculateColumnWidths();
// col elements, initialize
- $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn()) - 1;
+ $highestColumnIndex = \PHPExcel\Cell::columnIndexFromString($sheet->getHighestColumn()) - 1;
$column = -1;
while ($column++ < $highestColumnIndex) {
$this->columnWidths[$sheetIndex][$column] = 42; // approximation
@@ -865,7 +872,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
foreach ($sheet->getColumnDimensions() as $columnDimension) {
if (($width = \PHPExcel\Shared\Drawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont)) >= 0) {
$width = \PHPExcel\Shared\Drawing::pixelsToPoints($width);
- $column = PHPExcel_Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1;
+ $column = \PHPExcel\Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1;
$this->columnWidths[$sheetIndex][$column] = $width;
$css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt';
@@ -883,7 +890,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
$css['table.sheet' . $sheetIndex . ' tr'] = array();
if ($rowDimension->getRowHeight() == -1) {
- $pt_height = PHPExcel_Shared_Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont());
+ $pt_height = Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont());
} else {
$pt_height = $rowDimension->getRowHeight();
}
@@ -901,7 +908,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
$css['table.sheet' . $sheetIndex . ' tr.row' . $row] = array();
if ($rowDimension->getRowHeight() == -1) {
- $pt_height = PHPExcel_Shared_Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont());
+ $pt_height = Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont());
} else {
$pt_height = $rowDimension->getRowHeight();
}
@@ -1100,7 +1107,7 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
}
// Write