Merge pull request #34 from marcrobledo/marcrobledo-fix-percentage

fix percentage with decimals
This commit is contained in:
Sergey Shuchkin 2021-05-14 16:37:33 +06:00 committed by GitHub
commit 41c6e7ca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ class SimpleXLSXGen {
} elseif ( preg_match( '/^([-+]?\d+)%$/', $v, $m ) ) {
$cv = round( $m[1] / 100, 2 );
$N = self::N_PERCENT_INT; // [9] 0%
} elseif ( preg_match( '/^([-+]\d+\.\d+)%$/', $v, $m ) ) {
} elseif ( preg_match( '/^([-+]?\d+\.\d+)%$/', $v, $m ) ) {
$cv = round( $m[1] / 100, 4 );
$N = self::N_PRECENT_DEC; // [10] 0.00%
} elseif ( preg_match( '/^(\d\d\d\d)-(\d\d)-(\d\d)$/', $v, $m ) ) {