diff --git a/docs/Examples/Calculations/Database/DAVERAGE.php b/docs/Examples/Calculations/Database/DAVERAGE.php index 650e1324..b54a7d1d 100644 --- a/docs/Examples/Calculations/Database/DAVERAGE.php +++ b/docs/Examples/Calculations/Database/DAVERAGE.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Returns the average of selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DCOUNT.php b/docs/Examples/Calculations/Database/DCOUNT.php index 22669b36..2cd0661d 100644 --- a/docs/Examples/Calculations/Database/DCOUNT.php +++ b/docs/Examples/Calculations/Database/DCOUNT.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Counts the cells that contain numbers in a database.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DGET.php b/docs/Examples/Calculations/Database/DGET.php index 6a133426..d64b1d6e 100644 --- a/docs/Examples/Calculations/Database/DGET.php +++ b/docs/Examples/Calculations/Database/DGET.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Extracts a single value from a column of a list or database that matches conditions that you specify.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DMAX.php b/docs/Examples/Calculations/Database/DMAX.php index 18936c5b..58d2f039 100644 --- a/docs/Examples/Calculations/Database/DMAX.php +++ b/docs/Examples/Calculations/Database/DMAX.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Returns the maximum value from selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DMIN.php b/docs/Examples/Calculations/Database/DMIN.php index 0184173b..e4fb7658 100644 --- a/docs/Examples/Calculations/Database/DMIN.php +++ b/docs/Examples/Calculations/Database/DMIN.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Returns the minimum value from selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DPRODUCT.php b/docs/Examples/Calculations/Database/DPRODUCT.php index 41d60a2f..382227df 100644 --- a/docs/Examples/Calculations/Database/DPRODUCT.php +++ b/docs/Examples/Calculations/Database/DPRODUCT.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Multiplies the values in a column of a list or database that match conditions that you specify.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DSTDEV.php b/docs/Examples/Calculations/Database/DSTDEV.php index 2fbbda20..e1273e5a 100644 --- a/docs/Examples/Calculations/Database/DSTDEV.php +++ b/docs/Examples/Calculations/Database/DSTDEV.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Estimates the standard deviation based on a sample of selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DSTDEVP.php b/docs/Examples/Calculations/Database/DSTDEVP.php index 1f0a0fe6..3af791bb 100644 --- a/docs/Examples/Calculations/Database/DSTDEVP.php +++ b/docs/Examples/Calculations/Database/DSTDEVP.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Calculates the standard deviation based on the entire population of selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DVAR.php b/docs/Examples/Calculations/Database/DVAR.php index 00bd97aa..44e63994 100644 --- a/docs/Examples/Calculations/Database/DVAR.php +++ b/docs/Examples/Calculations/Database/DVAR.php @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Estimates variance based on a sample from selected database entries.

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/Database/DVARP.php b/docs/Examples/Calculations/Database/DVARP.php index c6cc0677..c630e731 100644 --- a/docs/Examples/Calculations/Database/DVARP.php +++ b/docs/Examples/Calculations/Database/DVARP.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Examples +PhpSpreadsheet Calculation Examples @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Calculates variance based on the entire population of selected database entries,

getActiveSheet(); // Add some data diff --git a/docs/Examples/Calculations/DateTime/DATE.php b/docs/Examples/Calculations/DateTime/DATE.php index 0179b7c1..1af05e3e 100644 --- a/docs/Examples/Calculations/DateTime/DATE.php +++ b/docs/Examples/Calculations/DateTime/DATE.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Examples +PhpSpreadsheet Calculation Examples @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Returns the serial number of a particular date.

getActiveSheet(); // Add some data @@ -76,4 +72,6 @@ echo '
'; echo ''; } ?> - \ No newline at end of file + + + \ No newline at end of file diff --git a/docs/Examples/Calculations/DateTime/DATEVALUE.php b/docs/Examples/Calculations/DateTime/DATEVALUE.php index 7b0a8556..42996a4e 100644 --- a/docs/Examples/Calculations/DateTime/DATEVALUE.php +++ b/docs/Examples/Calculations/DateTime/DATEVALUE.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Examples +PhpSpreadsheet Calculation Examples @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Converts a date in the form of text to a serial number.

getActiveSheet(); // Add some data @@ -51,7 +47,7 @@ echo '
'; // Test the formulae ?> -

Warning: The PHPExcel DATEVALUE() function accepts a wider range of date formats than MS Excel's DATEFORMAT() function.

+

Warning: The PhpSpreadsheet DATEVALUE() function accepts a wider range of date formats than MS Excel's DATEFORMAT() function.

@@ -69,4 +65,6 @@ echo '
'; echo ''; } ?> -
Date String
\ No newline at end of file + + + \ No newline at end of file diff --git a/docs/Examples/Calculations/DateTime/TIME.php b/docs/Examples/Calculations/DateTime/TIME.php index 3fae88c2..9c206304 100644 --- a/docs/Examples/Calculations/DateTime/TIME.php +++ b/docs/Examples/Calculations/DateTime/TIME.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Examples +PhpSpreadsheet Calculation Examples @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Returns the serial number of a particular time.

getActiveSheet(); // Add some data @@ -74,4 +70,6 @@ echo '
'; echo ''; } ?> - \ No newline at end of file + + + \ No newline at end of file diff --git a/docs/Examples/Calculations/DateTime/TIMEVALUE.php b/docs/Examples/Calculations/DateTime/TIMEVALUE.php index c482c374..c5745cc2 100644 --- a/docs/Examples/Calculations/DateTime/TIMEVALUE.php +++ b/docs/Examples/Calculations/DateTime/TIMEVALUE.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Examples +PhpSpreadsheet Calculation Examples @@ -19,14 +19,10 @@ date_default_timezone_set('Europe/London');

Converts a time in the form of text to a serial number.

getActiveSheet(); // Add some data @@ -65,4 +61,6 @@ echo '
'; echo ''; } ?> - \ No newline at end of file + + + \ No newline at end of file diff --git a/docs/Examples/Calculations/index.php b/docs/Examples/Calculations/index.php index 0c3d8c00..5990ca23 100644 --- a/docs/Examples/Calculations/index.php +++ b/docs/Examples/Calculations/index.php @@ -10,14 +10,14 @@ date_default_timezone_set('Europe/London'); -PHPExcel Calculation Function Examples +PhpSpreadsheet Calculation Function Examples PHPExcel Calculation Function Examples'; +echo '

PhpSpreadsheet Calculation Function Examples

'; $exampleTypeList = glob('./*', GLOB_ONLYDIR); diff --git a/docs/Examples/Reader/exampleReader01.php b/docs/Examples/Reader/exampleReader01.php index 1bad76d8..9ef1f565 100644 --- a/docs/Examples/Reader/exampleReader01.php +++ b/docs/Examples/Reader/exampleReader01.php @@ -10,20 +10,16 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reader Example #01 +PhpSpreadsheet Reader Example #01 -

PHPExcel Reader Example #01

+

PhpSpreadsheet Reader Example #01

Simple File Reader using \PhpOffice\PhpSpreadsheet\IOFactory::load()

'; diff --git a/docs/Examples/Reader/exampleReader02.php b/docs/Examples/Reader/exampleReader02.php index 2eccc24d..b98b860d 100644 --- a/docs/Examples/Reader/exampleReader02.php +++ b/docs/Examples/Reader/exampleReader02.php @@ -5,23 +5,19 @@ set_time_limit(0); date_default_timezone_set('Europe/London'); -/* Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** \PhpOffice\PhpSpreadsheet\IOFactory */ -include 'PHPExcel/IOFactory.php'; +require_once __DIR__ . '/../../../src/Bootstrap.php'; ?> -PHPExcel Reader Example #02 +PhpSpreadsheet Reader Example #02 -

PHPExcel Reader Example #02

+

PhpSpreadsheet Reader Example #02

Simple File Reader using a Specified Reader

-PHPExcel Reader Example #03 +PhpSpreadsheet Reader Example #03 -

PHPExcel Reader Example #03

+

PhpSpreadsheet Reader Example #03

Simple File Reader using the \PhpOffice\PhpSpreadsheet\IOFactory to Return a Reader

-PHPExcel Reader Example #04 +PhpSpreadsheet Reader Example #04 -

PHPExcel Reader Example #04

+

PhpSpreadsheet Reader Example #04

Simple File Reader using the \PhpOffice\PhpSpreadsheet\IOFactory to Identify a Reader to Use

-PHPExcel Reader Example #05 +PhpSpreadsheet Reader Example #05 -

PHPExcel Reader Example #05

+

PhpSpreadsheet Reader Example #05

Simple File Reader using the "Read Data Only" Option

-PHPExcel Reader Example #06 +PhpSpreadsheet Reader Example #06 -

PHPExcel Reader Example #06

+

PhpSpreadsheet Reader Example #06

Simple File Reader Loading All WorkSheets

-PHPExcel Reader Example #07 +PhpSpreadsheet Reader Example #07 -

PHPExcel Reader Example #07

+

PhpSpreadsheet Reader Example #07

Simple File Reader Loading a Single Named WorkSheet

-PHPExcel Reader Example #08 +PhpSpreadsheet Reader Example #08 -

PHPExcel Reader Example #08

+

PhpSpreadsheet Reader Example #08

Simple File Reader Loading Several Named WorkSheets

-PHPExcel Reader Example #09 +PhpSpreadsheet Reader Example #09 -

PHPExcel Reader Example #09

+

PhpSpreadsheet Reader Example #09

Simple File Reader Using a Read Filter

-PHPExcel Reader Example #10 +PhpSpreadsheet Reader Example #10 -

PHPExcel Reader Example #10

+

PhpSpreadsheet Reader Example #10

Simple File Reader Using a Configurable Read Filter

-PHPExcel Reader Example #11 +PhpSpreadsheet Reader Example #11 -

PHPExcel Reader Example #11

+

PhpSpreadsheet Reader Example #11

Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 1)

setReadFilter($chunkFilter); - /* Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/ + /* Load only the rows that match our filter from $inputFileName to a PhpSpreadsheet Object **/ $spreadsheet = $reader->load($inputFileName); // Do some processing here diff --git a/docs/Examples/Reader/exampleReader12.php b/docs/Examples/Reader/exampleReader12.php index 8ac4de27..673b2f14 100644 --- a/docs/Examples/Reader/exampleReader12.php +++ b/docs/Examples/Reader/exampleReader12.php @@ -10,20 +10,16 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reader Example #12 +PhpSpreadsheet Reader Example #12 -

PHPExcel Reader Example #12

+

PhpSpreadsheet Reader Example #12

Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 2)

'; /* Tell the Read Filter, the limits on which rows we want to read this iteration **/ $chunkFilter->setRows($startRow, $chunkSize); - /* Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/ + /* Load only the rows that match our filter from $inputFileName to a PhpSpreadsheet Object **/ $spreadsheet = $reader->load($inputFileName); // Do some processing here diff --git a/docs/Examples/Reader/exampleReader13.php b/docs/Examples/Reader/exampleReader13.php index 45f2c612..9977a83c 100644 --- a/docs/Examples/Reader/exampleReader13.php +++ b/docs/Examples/Reader/exampleReader13.php @@ -10,20 +10,16 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reader Example #13 +PhpSpreadsheet Reader Example #13 -

PHPExcel Reader Example #13

+

PhpSpreadsheet Reader Example #13

Simple File Reader for Multiple CSV Files

-PHPExcel Reader Example #15 +PhpSpreadsheet Reader Example #14 -

PHPExcel Reader Example #14

+

PhpSpreadsheet Reader Example #14

Reading a Large CSV file in "Chunks" to split across multiple Worksheets

setReadFilter($chunkFilter) ->setContiguous(true); -/* Instantiate a new PHPExcel object manually **/ -$spreadsheet = new PHPExcel(); +/* Instantiate a new PhpSpreadsheet object manually **/ +$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet(); /* Set a sheet index **/ $sheet = 0; @@ -83,7 +84,7 @@ for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { /* Increment the worksheet index pointer for the Reader **/ $reader->setSheetIndex($sheet); - /* Load only the rows that match our filter into a new worksheet in the PHPExcel Object **/ + /* Load only the rows that match our filter into a new worksheet in the PhpSpreadsheet Object **/ $reader->loadIntoExisting($inputFileName, $spreadsheet); /* Set the worksheet title (to reference the "sheet" of data that we've loaded) **/ /* and increment the sheet index as well **/ diff --git a/docs/Examples/Reader/exampleReader15.php b/docs/Examples/Reader/exampleReader15.php index 7931a073..a04a1adc 100644 --- a/docs/Examples/Reader/exampleReader15.php +++ b/docs/Examples/Reader/exampleReader15.php @@ -1,24 +1,25 @@ -PHPExcel Reader Example #15 +PhpSpreadsheet Reader Example #15 -

PHPExcel Reader Example #15

+

PhpSpreadsheet Reader Example #15

Simple File Reader for Tab-Separated Value File using the Advanced Value Binder

-PHPExcel Reader Example #16 +PhpSpreadsheet Reader Example #16 -

PHPExcel Reader Example #16

+

PhpSpreadsheet Reader Example #16

Handling Loader Exceptions using Try/Catch

'; try { $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName); -} catch (\PHPExcel\Reader\Exception $e) { +} catch (\InvalidArgumentException $e) { die('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME) . '": ' . $e->getMessage()); } diff --git a/docs/Examples/Reader/exampleReader17.php b/docs/Examples/Reader/exampleReader17.php index fbcae6b1..f76994e9 100644 --- a/docs/Examples/Reader/exampleReader17.php +++ b/docs/Examples/Reader/exampleReader17.php @@ -10,20 +10,16 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reader Example #17 +PhpSpreadsheet Reader Example #17 -

PHPExcel Reader Example #17

+

PhpSpreadsheet Reader Example #17

Simple File Reader Loading Several Named WorkSheets

-PHPExcel Reader Example #18 +PhpSpreadsheet Reader Example #18 -

PHPExcel Reader Example #18

+

PhpSpreadsheet Reader Example #18

Reading list of WorkSheets without loading entire file

-PHPExcel Reader Example #19 +PhpSpreadsheet Reader Example #19 -

PHPExcel Reader Example #19

+

PhpSpreadsheet Reader Example #19

Reading WorkSheet information without loading entire file

-PHPExcel Reading WorkBook Data Example #01 +PhpSpreadsheet Reading WorkBook Data Example #01 -

PHPExcel Reading WorkBook Data Example #01

+

PhpSpreadsheet Reading WorkBook Data Example #01

Read the WorkBook Properties

load($inputFileName); echo '
'; diff --git a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php index 5018ea00..c021728c 100644 --- a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php +++ b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php @@ -10,27 +10,23 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reading WorkBook Data Example #02 +PhpSpreadsheet Reading WorkBook Data Example #02 -

PHPExcel Reading WorkBook Data Example #02

+

PhpSpreadsheet Reading WorkBook Data Example #02

Read a list of Custom Properties for a WorkBook

load($inputFileName); echo '
'; diff --git a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php index 6d56a3fb..c02f51bd 100644 --- a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php +++ b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php @@ -10,27 +10,23 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reading WorkBook Data Example #03 +PhpSpreadsheet Reading WorkBook Data Example #03 -

PHPExcel Reading WorkBook Data Example #03

+

PhpSpreadsheet Reading WorkBook Data Example #03

Read Custom Property Values for a WorkBook

load($inputFileName); echo '
'; diff --git a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader04.php b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader04.php index 307d8ede..88c7f9e0 100644 --- a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader04.php +++ b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader04.php @@ -10,38 +10,34 @@ date_default_timezone_set('Europe/London'); -PHPExcel Reading WorkBook Data Example #04 +PhpSpreadsheet Reading WorkBook Data Example #04 -

PHPExcel Reading WorkBook Data Example #04

+

PhpSpreadsheet Reading WorkBook Data Example #04

Get a List of the Worksheets in a WorkBook

load($inputFileName); echo '
'; echo 'Reading the number of Worksheets in the WorkBook
'; -/* Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ +/* Use the PhpSpreadsheet object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ $sheetCount = $spreadsheet->getSheetCount(); echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook

'; echo 'Reading the names of Worksheets in the WorkBook
'; -/* Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ +/* Use the PhpSpreadsheet object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ $sheetNames = $spreadsheet->getSheetNames(); foreach ($sheetNames as $sheetIndex => $sheetName) { echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"
'; diff --git a/docs/Examples/index.php b/docs/Examples/index.php index f776a26a..a2c51879 100644 --- a/docs/Examples/index.php +++ b/docs/Examples/index.php @@ -10,7 +10,7 @@ date_default_timezone_set('Europe/London'); -PHPExcel Examples +PhpSpreadsheet Examples @@ -20,7 +20,7 @@ date_default_timezone_set('Europe/London'); $exampleTypeList = glob('./*', GLOB_ONLYDIR); foreach ($exampleTypeList as $exampleType) { - echo '

PHPExcel ' . pathinfo($exampleType, PATHINFO_BASENAME) . ' Examples

'; + echo '

PhpSpreadsheet ' . pathinfo($exampleType, PATHINFO_BASENAME) . ' Examples

'; $exampleList = glob('./' . $exampleType . '/*.php');