mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-21 21:03:41 +00:00
5266086781
Further reorganization following on PR #3890.
24 lines
707 B
PHP
24 lines
707 B
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
|
|
|
require __DIR__ . '/../Header.php';
|
|
|
|
$helper->log('Returns the column index of a cell.');
|
|
|
|
// Create new PhpSpreadsheet object
|
|
$spreadsheet = new Spreadsheet();
|
|
$worksheet = $spreadsheet->getActiveSheet();
|
|
|
|
$worksheet->getCell('A1')->setValue('=COLUMN(C13)');
|
|
$worksheet->getCell('A2')->setValue('=COLUMN(E13:G15)');
|
|
$worksheet->getCell('F1')->setValue('=COLUMN()');
|
|
|
|
for ($row = 1; $row <= 2; ++$row) {
|
|
$cell = $worksheet->getCell("A{$row}");
|
|
$helper->log("A{$row}: " . $cell->getValue() . ' => ' . $cell->getCalculatedValue());
|
|
}
|
|
|
|
$cell = $worksheet->getCell('F1');
|
|
$helper->log('F1: ' . $cell->getValue() . ' => ' . $cell->getCalculatedValue());
|