jasonrogena / jasonrogena/php-excel-reader

Excel to Csv

Open
#153 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

```
my script don't work when i save the CSV file
please help me
setOutputEncoding('CP1251'); // Set output Encoding.
$data->read('prodotti.xls');
error_reporting(E_ALL ^ E_NOTICE);

echo "";
//ciclo su tutte le righe
for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
echo "";
//ciclo sulla prima colonna
for ($j = 1; $j <= 1; $j++) {
echo "";
}

//ciclo sulla quarta colonna
for ($j = 4; $j <= 4; $j++) {
echo "";

}
echo "";

}
echo "".$data->sheets[0]['cells'][$i][$j]."".$data->sheets[0]['cells'][$i][$j]."";
$csv = "";
$rows = $data->rowcount();
$cols = $data->colcount();
$csv .= $data->raw($i, $j);
if($j == $cols - 1) {
$csv .= "\n";
} else {
$csv .= ",";
}

$handler = fopen("test1.csv", "w");
fwrite($csv, $handler);
fclose($handler);
?>
```

Original issue reported on code.google.com by `Raffaele...@gmail.com` on 24 Aug 2012 at 10:36

Contributor guide

No contributing guide indexed for this repository

Research direction

The report only includes an inline PHP script, so begin by reproducing it with the shown Spreadsheet_Excel_Reader calls and reviewing the read, rowcount, colcount, raw, and file-writing sections. Done means the expected spreadsheet rows and columns are written to test1.csv in a defined CSV format, but the current failure and expected output need clarification first.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.