jasonrogena / jasonrogena/php-excel-reader

val() function returns garbage sometimes

Open
#104 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. get the particular XLS file that I have that contains sensitive information
thus i cannot publically share it (seems to happen with any encoding i try)
2. change old existing code that uses this script from using
$data->sheets[0]['cells'][$i][$j] to $data->val($i, $j, 0)
3. convert to CSV and check input vs output

What is the expected output? What do you see instead?

instead of the 11th and 12th columns having proper data in them, they have crap
with missing letters and dashes and equals signs and stars, i.e. "company" ->
"y-co-pa" and "Calgary Public Library" -> "y Pu-Ca-ga"

Please provide any additional information below.

I cannot change any settings with the spreadsheet as I'm running a PHP script
on a Linux server that is pulling it off another server, converting it to CSV,
then importing into an SQL database. I saw in the documentation that I should
use the val() function instead of accessing the data directly but this seems to
not be an option.

```

Original issue reported on code.google.com by `RedScou...@gmail.com` on 18 Jan 2011 at 10:40

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining the val($i, $j, 0) path and comparing it with direct access through $data->sheets[0]['cells'][$i][$j]. Reproduce the XLS-to-CSV conversion if possible, then verify whether the 11th and 12th columns preserve values such as "company" and "Calgary Public Library"; the reported XLS file is not publicly available.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.