Skip to content

Right alignment error - and fix #173

@ErikLtz

Description

@ErikLtz

Had problems with right-alignment becoming centered in some cells, found this regexp in SimpleXLSGen code:
preg_match('/^[0-9+-.]+$/', $v)
that seem to miss quoting for special chars second - and . so changed to:
'/^[0-9+\-\.]+$/'
which made my cells align right as intended.

Line 985 in SimpleXLSGen.php version 1.5.12, these lines for context:
} elseif (preg_match('/^[0-9+-.]+$/', $v)) { // Long ?
$A += ($A & (self::A_LEFT | self::A_CENTER)) ? 0 : self::A_RIGHT;

Hope this can be verified and included in a future release 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions