jasonrogena / jasonrogena/php-excel-reader

how many sheets in a XLS file?

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

```
I don't find a way to get the number of sheets in a XLS file accroding to the
excel-reader api,but there is a simple way to finish it.

we can use the function rowcount($sheet=0) to finish it.

The code just like the follow,and it works well.Put it in the Class
Spreadsheet_Excel_Reader.
//////////////////Code here

function countSheets()
{
$i = 0;
while(1)
{
if($this->rowcount($i) > 0)
{
$i++;
}
else
{
break;
}
}
return $i;
}

```

Original issue reported on code.google.com by `xiaoLin3...@gmail.com` on 17 Oct 2010 at 5:50

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the Spreadsheet_Excel_Reader class and inspect how rowcount($sheet=0) behaves for valid and invalid sheet indexes. Add a countSheets entry point that reports the number of available sheets, then verify it against XLS files with multiple sheets and an empty or missing next index.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.