Skip to content

regression bug in 1.29 for getHighestColumn in ods #3721

Closed
@oprudkyi

Description

This is:

- [x] a bug report
- [ ] a feature request
- [x] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

getHighestColumn() should return correct value

What is the current behavior?

1.28.0 - 'C'
1.29.0 - 'BL'

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\IOFactory;

$filePath = 'test.ods';
$reader = IOFactory::createReaderForFile($filePath);
$reader->setReadDataOnly(false);

// disable warnings, because PHPSpreadsheet lib has error in own sources
try {
    $oldReporting = error_reporting(error_reporting() & ~E_NOTICE);
    $spreadsheet = $reader->load($filePath);
} finally {
    error_reporting($oldReporting);
}

$sheet = $spreadsheet->getSheetByName('sheet with data');
$highestColumn = $sheet->getHighestColumn(); // e.g 'F'
echo $highestColumn . PHP_EOL;

File used:
test.ods

What features do you think are causing the issue

  • Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

ods

Which versions of PhpSpreadsheet and PHP are affected?

1.29.0
php: 8.2.8

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions