jasonrogena / jasonrogena/php-excel-reader

Some negative numbers read incorrectly

Open
#123 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
PHP
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. Read a row from an XLS file containing a number.
2. Echo one of the cells.

What is the expected output? What do you see instead?
The number is for example -6504.34. php-excel-reader echoes it as 10731120.61.
Some numbers are read correctly but they are smaller (-444.3 is read correct).
The formatting of the numbers is General.

I tried reading it with PHPExcel and it read these numbers correctly. But I
can't use that library cause the sheet contains 50k+ rows and php-excel-reader
is small and fast and efficient.

Can I get a quick fix or something? This is really important.

```

Original issue reported on code.google.com by `endar...@gmail.com` on 17 Jul 2011 at 8:39

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the report in php-excel-reader with an XLS row containing -6504.34 and compare it with the correctly read -444.3 value. Trace the XLS number-reading path and verify that negative General-format values are returned unchanged rather than converted to a large positive number.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.