
<?php

  error_reporting(E_ALL | E_WARNING | E_NOTICE);
	ini_set('display_errors', TRUE);


//****** PART C: PhpSpreadsheet ***********************************************************************************************************************************************************//	
require 'spreadsheet/vendor/autoload.php';

$inputFileTypeC = 'Xlsx';
$inputFileNameC = 'A1_data_input/C08_Project_Cost.xlsx';
$sheetnameC = 'Details';

$readerC = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileTypeC);
$readerC->setLoadSheetsOnly($sheetnameC);


$spreadsheetC = $readerC->load($inputFileNameC);	


    $highest_row = $spreadsheetC->getActiveSheet()->getHighestRow();
    $highest_column = $spreadsheetC->getActiveSheet()->getHighestColumn();

    echo '<table border="1">';
    for ($row = 1; $row <= $highest_row; $row++) {
    echo '<tr>';
    for ($col = 'A'; $col <= $highest_column; $col++) {
        $cell_value = $spreadsheetC->getActiveSheet()->getCell($col.$row)->getValue();
        echo '<td>'.$cell_value.'</td>';
    }
    echo '</tr>';
}
echo '</table>';




?>
</body>





