doy / spreadsheet-parsexlsx

parse XLSX files
http://metacpan.org/release/Spreadsheet-ParseXLSX
27 stars 35 forks source link

$book->get_active_sheet () method missing #75

Open Tux opened 7 years ago

Tux commented 7 years ago

Spreadsheet::ParseExcel offers the get_active_sheet method, which is not supported/implemented in Spreadsheet::ParseXLSX

The code shows me

    my ($node) = $files->{workbook}->find_nodes('//s:workbookView');
    my $selected = $node ? $node->att('activeTab') : undef;
    $workbook->{SelectedSheet} = defined($selected) ? 0+$selected : 0;

    return $workbook;

at the end of the _parse_workbook sub, so it /knows/ about active sheets but does not promote that to the user.

Furthermore, there currently is no way to match a sheet to this tag, as the "_SheetNo" entry in the hash is of an ASCII format like "rId1" (which is numeric in Spreadsheet::ParseExcel), versus the SelectedSheet entry being numeric.

Tux commented 7 years ago

Should I try to dig myself and come up with a PR?