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,30 +22,30 @@ 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 = 'Xlsx';
$inputFileName = './sampleData/example1.xlsx';
/* 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 />';
/* Read an array list of any custom properties for this document **/
$customPropertyList = $objPHPExcel->getProperties()->getCustomProperties();
$customPropertyList = $spreadsheet->getProperties()->getCustomProperties();
echo '<b>Custom Properties: </b><br />';
/* Loop through the list of custom properties **/
foreach ($customPropertyList as $customPropertyName) {
echo '<b>',$customPropertyName,': </b>';
/* Retrieve the property value **/
$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName);
$propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customPropertyName);
/* Retrieve the property type **/
$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName);
$propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customPropertyName);
/* Manipulate properties as appropriate for display purposes **/
switch ($propertyType) {