Convert docs with our migrator

This commit is contained in:
Adrien Crivelli
2016-11-28 00:51:44 +09:00
parent 5ad6ced95c
commit 144848f9dd
72 changed files with 1668 additions and 1672 deletions
@@ -22,27 +22,27 @@ date_default_timezone_set('Europe/London');
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
/** PHPExcel_IOFactory */
/** \PhpOffice\PhpSpreadsheet\IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileType = 'Xls';
$inputFileName = './sampleData/example2.xls';
/* Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objReader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
/* Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
$spreadsheet = $objReader->load($inputFileName);
echo '<hr />';
echo 'Reading the number of Worksheets in the WorkBook<br />';
/* Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */
$sheetCount = $objPHPExcel->getSheetCount();
$sheetCount = $spreadsheet->getSheetCount();
echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />';
echo 'Reading the names of Worksheets in the WorkBook<br />';
/* Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */
$sheetNames = $objPHPExcel->getSheetNames();
$sheetNames = $spreadsheet->getSheetNames();
foreach ($sheetNames as $sheetIndex => $sheetName) {
echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />';
}