Code style partially according to Scrutinizer
This commit is contained in:
parent
31daed0048
commit
4a47a32953
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DAVERAGE</h1>
|
||||
<h2>Returns the average of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DAVERAGE() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DCOUNT</h1>
|
||||
<h2>Counts the cells that contain numbers in a database.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DCOUNT() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DGET</h1>
|
||||
<h2>Extracts a single value from a column of a list or database that matches conditions that you specify.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -71,7 +69,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DMAX() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DMAX</h1>
|
||||
<h2>Returns the maximum value from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -74,7 +72,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DMAX() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DMIN</h1>
|
||||
<h2>Returns the minimum value from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -74,7 +72,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DMIN() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DPRODUCT</h1>
|
||||
<h2>Multiplies the values in a column of a list or database that match conditions that you specify.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -71,7 +69,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DMAX() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DSTDEV</h1>
|
||||
<h2>Estimates the standard deviation based on a sample of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DSTDEV() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DSTDEVP</h1>
|
||||
<h2>Calculates the standard deviation based on the entire population of selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DSTDEVP() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DVAR</h1>
|
||||
<h2>Estimates variance based on a sample from selected database entries.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DVAR() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DVARP</h1>
|
||||
<h2>Calculates variance based on the entire population of selected database entries,</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
@ -75,7 +73,6 @@ var_dump($criteriaData);
|
|||
|
||||
echo $worksheet->getCell('A13')->getValue() . '<br />';
|
||||
echo 'DVARP() Result is ' . $worksheet->getCell('B13')->getCalculatedValue();
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DATE</h1>
|
||||
<h2>Returns the serial number of a particular date.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>DATEVALUE</h1>
|
||||
<h2>Converts a date in the form of text to a serial number.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>TIME</h1>
|
||||
<h2>Returns the serial number of a particular time.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>TIMEVALUE</h1>
|
||||
<h2>Converts a time in the form of text to a serial number.</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../../src/Bootstrap.php';
|
||||
|
||||
// Create new PhpSpreadsheet object
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -16,7 +14,6 @@ date_default_timezone_set('Europe/London');
|
|||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
echo '<h1>PhpSpreadsheet Calculation Function Examples</h1>';
|
||||
|
||||
$exampleTypeList = glob('./*', GLOB_ONLYDIR);
|
||||
|
@ -43,7 +40,6 @@ foreach ($exampleTypeList as $exampleType) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #01</h1>
|
||||
<h2>Simple File Reader using IOFactory::load()</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
@ -31,7 +29,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -8,7 +8,6 @@ set_time_limit(0);
|
|||
date_default_timezone_set('Europe/London');
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -22,24 +21,16 @@ require_once __DIR__ . '/../../../src/Bootstrap.php';
|
|||
<h1>PhpSpreadsheet Reader Example #02</h1>
|
||||
<h2>Simple File Reader using a Specified Reader</h2>
|
||||
<?php
|
||||
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using \PhpOffice\PhpSpreadsheet\Reader\Xls<br />';
|
||||
$reader = new Xls();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xml();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Ods();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Slk();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Gnumeric();
|
||||
// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
|
||||
$spreadsheet = $reader->load($inputFileName);
|
||||
|
||||
echo '<hr />';
|
||||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,16 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #03</h1>
|
||||
<h2>Simple File Reader using the IOFactory to Return a Reader</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Slk';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
// $inputFileType = 'Csv';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -40,7 +32,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #04</h1>
|
||||
<h2>Simple File Reader using the IOFactory to Identify a Reader to Use</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
@ -36,7 +34,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #05</h1>
|
||||
<h2>Simple File Reader using the "Read Data Only" Option</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -40,7 +34,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #06</h1>
|
||||
<h2>Simple File Reader Loading All WorkSheets</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -43,7 +37,6 @@ $loadedSheetNames = $spreadsheet->getSheetNames();
|
|||
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
||||
echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #07</h1>
|
||||
<h2>Simple File Reader Loading a Single Named WorkSheet</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
$sheetname = 'Data Sheet #2';
|
||||
|
||||
|
@ -44,7 +38,6 @@ $loadedSheetNames = $spreadsheet->getSheetNames();
|
|||
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
||||
echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #08</h1>
|
||||
<h2>Simple File Reader Loading Several Named WorkSheets</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
$sheetnames = ['Data Sheet #1', 'Data Sheet #3'];
|
||||
|
||||
|
@ -44,7 +38,6 @@ $loadedSheetNames = $spreadsheet->getSheetNames();
|
|||
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
||||
echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,14 +20,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #09</h1>
|
||||
<h2>Simple File Reader Using a Read Filter</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
$sheetname = 'Data Sheet #3';
|
||||
|
||||
|
@ -45,6 +39,7 @@ class MyReadFilter implements IReadFilter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$filterSubset = new MyReadFilter();
|
||||
|
@ -61,7 +56,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,23 +20,17 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #10</h1>
|
||||
<h2>Simple File Reader Using a Configurable Read Filter</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
$sheetname = 'Data Sheet #3';
|
||||
|
||||
class MyReadFilter implements IReadFilter
|
||||
{
|
||||
|
||||
private $_startRow = 0;
|
||||
|
||||
private $_endRow = 0;
|
||||
|
||||
private $_columns = [];
|
||||
|
||||
public function __construct($startRow, $endRow, $columns)
|
||||
|
@ -57,6 +50,7 @@ class MyReadFilter implements IReadFilter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$filterSubset = new MyReadFilter(9, 15, range('G', 'K'));
|
||||
|
@ -73,7 +67,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,21 +20,16 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #11</h1>
|
||||
<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 1)</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example2.xls';
|
||||
|
||||
/** Define a Read Filter class implementing IReadFilter */
|
||||
class chunkReadFilter implements IReadFilter
|
||||
{
|
||||
private $_startRow = 0;
|
||||
|
||||
private $_startRow = 0;
|
||||
private $_endRow = 0;
|
||||
|
||||
/**
|
||||
|
@ -59,6 +53,7 @@ class chunkReadFilter implements IReadFilter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -86,7 +81,6 @@ for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
|
|||
var_dump($sheetData);
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,21 +20,16 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #12</h1>
|
||||
<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 2)</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example2.xls';
|
||||
|
||||
/** Define a Read Filter class implementing IReadFilter */
|
||||
class chunkReadFilter implements IReadFilter
|
||||
{
|
||||
private $_startRow = 0;
|
||||
|
||||
private $_startRow = 0;
|
||||
private $_endRow = 0;
|
||||
|
||||
/**
|
||||
|
@ -59,6 +53,7 @@ class chunkReadFilter implements IReadFilter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -89,7 +84,6 @@ for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
|
|||
var_dump($sheetData);
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #13</h1>
|
||||
<h2>Simple File Reader for Multiple CSV Files</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Csv';
|
||||
|
@ -49,7 +47,6 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
|||
var_dump($sheetData);
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -8,7 +8,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -22,7 +21,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #14</h1>
|
||||
<h2>Reading a Large CSV file in "Chunks" to split across multiple Worksheets</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Csv';
|
||||
|
@ -31,8 +29,8 @@ $inputFileName = './sampleData/example2.csv';
|
|||
/** Define a Read Filter class implementing IReadFilter */
|
||||
class chunkReadFilter implements IReadFilter
|
||||
{
|
||||
private $_startRow = 0;
|
||||
|
||||
private $_startRow = 0;
|
||||
private $_endRow = 0;
|
||||
|
||||
/**
|
||||
|
@ -56,6 +54,7 @@ class chunkReadFilter implements IReadFilter
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -106,7 +105,6 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
|||
var_dump($sheetData);
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,7 +20,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #15</h1>
|
||||
<h2>Simple File Reader for Tab-Separated Value File using the Advanced Value Binder</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
Cell::setValueBinder(new Cell\AdvancedValueBinder());
|
||||
|
@ -66,7 +64,6 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
|
|||
var_dump($sheetData);
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -7,7 +7,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -21,7 +20,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #16</h1>
|
||||
<h2>Handling Loader Exceptions using Try/Catch</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileName = './sampleData/example_1.xls';
|
||||
|
@ -36,7 +34,6 @@ echo '<hr />';
|
|||
|
||||
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
|
||||
var_dump($sheetData);
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #17</h1>
|
||||
<h2>Simple File Reader Loading Several Named WorkSheets</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -41,7 +35,6 @@ echo 'There are ',count($worksheetNames),' worksheet',((count($worksheetNames) =
|
|||
foreach ($worksheetNames as $worksheetName) {
|
||||
echo $worksheetName, '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #18</h1>
|
||||
<h2>Reading list of WorkSheets without loading entire file</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -41,7 +35,6 @@ foreach ($worksheetNames as $worksheetName) {
|
|||
echo '<li>', $worksheetName, '</li>';
|
||||
}
|
||||
echo '</ol>';
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,14 +19,9 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reader Example #19</h1>
|
||||
<h2>Reading WorkSheet information without loading entire file</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
// $inputFileType = 'Xlsx';
|
||||
// $inputFileType = 'Xml';
|
||||
// $inputFileType = 'Ods';
|
||||
// $inputFileType = 'Gnumeric';
|
||||
$inputFileName = './sampleData/example1.xls';
|
||||
|
||||
echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />';
|
||||
|
@ -44,7 +38,6 @@ foreach ($worksheetData as $worksheet) {
|
|||
echo '</li>';
|
||||
}
|
||||
echo '</ol>';
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reading WorkBook Data Example #01</h1>
|
||||
<h2>Read the WorkBook Properties</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
|
@ -82,7 +80,6 @@ echo '<b>Company: </b>',$company,'<br />';
|
|||
/* Read the workbook manager property * */
|
||||
$manager = $spreadsheet->getProperties()->getManager();
|
||||
echo '<b>Manager: </b>', $manager, '<br />';
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reading WorkBook Data Example #02</h1>
|
||||
<h2>Read a list of Custom Properties for a WorkBook</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xlsx';
|
||||
|
@ -40,7 +38,6 @@ echo '<b>Custom Property names: </b><br />';
|
|||
foreach ($customPropertyList as $customPropertyName) {
|
||||
echo $customPropertyName, '<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reading WorkBook Data Example #03</h1>
|
||||
<h2>Read Custom Property Values for a WorkBook</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xlsx';
|
||||
|
@ -68,7 +66,6 @@ foreach ($customPropertyList as $customPropertyName) {
|
|||
|
||||
echo $propertyValue, ' (', $propertyType, ')<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
||||
|
|
|
@ -6,7 +6,6 @@ error_reporting(E_ALL);
|
|||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -20,7 +19,6 @@ date_default_timezone_set('Europe/London');
|
|||
<h1>PhpSpreadsheet Reading WorkBook Data Example #04</h1>
|
||||
<h2>Get a List of the Worksheets in a WorkBook</h2>
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/../../../src/Bootstrap.php';
|
||||
|
||||
$inputFileType = 'Xls';
|
||||
|
@ -44,7 +42,6 @@ $sheetNames = $spreadsheet->getSheetNames();
|
|||
foreach ($sheetNames as $sheetIndex => $sheetName) {
|
||||
echo 'WorkSheet #', $sheetIndex, ' is named "', $sheetName, '"<br />';
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -16,7 +14,6 @@ date_default_timezone_set('Europe/London');
|
|||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
$exampleTypeList = glob('./*', GLOB_ONLYDIR);
|
||||
|
||||
foreach ($exampleTypeList as $exampleType) {
|
||||
|
@ -42,7 +39,6 @@ foreach ($exampleTypeList as $exampleType) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<body>
|
||||
</html>
|
|
@ -3770,9 +3770,6 @@ class Calculation
|
|||
$output = $stack->pop();
|
||||
$output = $output['value'];
|
||||
|
||||
// if ((is_array($output)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) {
|
||||
// return array_shift(Calculation\Functions::flattenArray($output));
|
||||
// }
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -436,8 +436,6 @@ class SingularValueDecomposition
|
|||
} // end while
|
||||
}
|
||||
|
||||
// end constructor
|
||||
|
||||
/**
|
||||
* Return the left singular vectors.
|
||||
*
|
||||
|
|
|
@ -306,7 +306,6 @@ class Worksheet extends WriterPart
|
|||
}
|
||||
|
||||
// Selection
|
||||
// if ($pane != '') {
|
||||
// Only need to write selection element if we have a split pane
|
||||
// We cheat a little by over-riding the active cell selection, setting it to the split cell
|
||||
$objWriter->startElement('selection');
|
||||
|
@ -316,7 +315,6 @@ class Worksheet extends WriterPart
|
|||
$objWriter->writeAttribute('activeCell', $activeCell);
|
||||
$objWriter->writeAttribute('sqref', $activeCell);
|
||||
$objWriter->endElement();
|
||||
// }
|
||||
|
||||
$objWriter->endElement();
|
||||
|
||||
|
|
Loading…
Reference in New Issue