Hi This should be pretty simple but I can't figure it out. Can anyone tell me how I can extract one specific cell (like B4 in the spreedsheet)?
I can do something like this (from the included examples) to get all the cells, but I only want this exact one!
echo '<tr>';
for ( $i = 0; $i < $num_cols; $i ) {
echo '<td>' . ( ! empty( $r[ $i ] ) ? $r[ $i ] : ' ' ) . '
CodePudding user response:
Use PHPOffice/PhpSpreadsheet or any other package like this. You will get much functionality for working with excel.
$spreadSheet = new Spreadsheet();
$cellValue = $spreadSheet->getActiveSheet()->getCell('B4')->getValue();