jasonrogena / jasonrogena/php-excel-reader

negate numbers showing incorrectly when created in openoffice or neooffice

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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.Create a spreadsheet with negative numbers
-1 -5 -10 -50 -100 -250
2. Save the document as an xls file (97/2000/xp)
3. Read the spreadsheet using php-excell-reader

What is the expected output?
The data should show
-1 -5 -10 -50 -100 -250

What do you see instead?
-1 1073741819 1073741814 1073741774 1073741724 1073741574

Please provide any additional information below.

Debugging this shows that we are in
case SPREADSHEET_EXCEL_READER_TYPE_MULRK:

and that in the call to function _GetIEEE754($rknum) we fall into the case
($rknum & 0x02) != 0)

```

Original issue reported on code.google.com by `npmar...@gmail.com` on 8 Jun 2009 at 6:16

Attachments:
- [sample.xls](https://storage.googleapis.com/google-code-attachments/php-excel-reader/issue-28/comment-0/sample.xls)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the attached sample.xls and trace the SPREADSHEET_EXCEL_READER_TYPE_MULRK path into _GetIEEE754($rknum), especially the branch for ($rknum & 0x02) != 0. Done means negative values from the OpenOffice or NeoOffice-generated XLS are read as -1, -5, -10, -50, -100, and -250 rather than large positive numbers.

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.