The Spreadsheet::ParseExcel does the work fine, however I need a method to read a file without it, lets say wih “out of the box Perl” as I’m unable to install any PM or CPAN module. Does anyone has a suggestion to get me started?
The Spreadsheet::ParseExcel does the work fine, however I need a method to read a
Share
What is a relatively easy task using CPAN modules is actually very difficult without them.
For a start the Excel binary data (BIFF) is stored in another binary file format called an OLE compound document. This is like a file system within a file and the BIFF data might not be stored sequentially. So to start you would have to write a parser to get the data out.
Once the raw BIFF data is extracted you have to parse it to find cell data. That is a little easier but still contains difficulties such as the strings being stored in a hash table away from the cell data. And dates that are indistinguishable from plain numbers. And data in merged cells. And everything is still in binary and bitmasks control the meaning of data structures.
Fortunately all these headaches have been suffered by someone else* and wrapped up in a module so no-one else has to endure them.
So, even if your admins won’t install modules for you there are lots of ways to install modules or even install perl locally so that you don’t have to bother them. In the end that will probably be an easier solution.
* Me partially.