I'm assuming you've searched on google for PHP and XLS parsing (if not, please do so, there may be a PHP/XLS library out there that will help - also check out the Pear libraries).
When I had last looked (which was a few years ago), I wasn't able to find anything so I resorted to using Perl's ParseExcel library. You can find more info about it here: http://www-106.ibm.com/developerworks/linux/library/l-pexcel/
Using Perl, you should be able to do what you need to and pass the results back to PHP.