jasonrogena / jasonrogena/php-excel-reader
Wrong number format is applied? 19,90 turns into 20
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
simply read and print out the data and see the problem at hand:
$data = new Spreadsheet_Excel_Reader("../../SandeliuLikuciai.xls");
$array=array('data'=>$data->sheets[0]['cells']);
unset($array['data'][1]);
print_r($array);
What is the expected output? What do you see instead?
Cell has number 19,90 (with format #.##0,00)
Reader gives me number 20, which I would get in Excel as well if I changed
number format to #.##0;-#.##0
Please provide any additional information below.
Attached a file that is being read. Checking lines 242 in the files, which have
cents after , sign
Problem is definitelly with numbar format, but can't seem to find how to fix
it, Please help
```
Original issue reported on code.google.com by `isgra...@gmail.com` on 27 Apr 2012 at 2:33
Attachments:
- [SandeliuLikuciai20120427.xls](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-147/comment-0/SandeliuLikuciai20120427.xls)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached SandeliuLikuciai20120427.xls and inspect the cells around line 242, where the issue says values have cents after the comma. Read the number-format handling in Spreadsheet_Excel_Reader; done means a cell containing 19,90 is returned with its cents rather than rounded to 20.
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
- 25/100