in reply to Perl module problem

In short: $oBook->{SheetCount} is undefined, probably because the key "SheetCount" does not exist in the hash reference $oBook.

Probably this line fails to find all the expected things from the Excel file referred to by $excelfileis.

my $oBook = $oExcel->Parse("$excelfileis");
It also could be a scoping problem: It's very odd to use a module inside a subroutine like that. And your strange indentation suggests that the for loop may actually be outside the scope of sub xls_conv in your actual program.

Have you tried adding use strict to your code to see whether there is some scoping problem? To check whether the $oBook in the for loop is actually the one you expect (and not an unitialized package global).

Hope this helps.

Liz