stevieb has asked for the wisdom of the Perl Monks concerning the following question:

This has been asked before, but with so many options out there, I would like current recommendations. I have an MS Excel file (may as well be a csv as there isn't any functions or magic in it) that I need to read and convert into Tex format. Without the ability to first convert to csv, which is the most convenient (least dependencies) Excel module to read in the data? I'll do the conversion myself.

Thanks,

-stevieb

Replies are listed 'Best First'.
Re: Recommendation on an Excel parser
by kcott (Archbishop) on Oct 07, 2015 at 07:05 UTC

    G'day stevieb,

    For XLSX (Excel 2007 Open XML XLSX format), I've successfully used Spreadsheet::ParseXLSX.

    For the older XLS format: Spreadsheet::ParseExcel.

    After instantiation and calling the parse() method, use of these two modules is virtually identical. Most of the documentation is in Spreadsheet::ParseExcel but do see Spreadsheet::ParseXLSX for a few differences.

    — Ken

Re: Recommendation on an Excel parser
by runrig (Abbot) on Oct 06, 2015 at 23:34 UTC
    Depends whether it's an xls or xlsx file. I like Spreadsheet::ParseExcel::Stream since it will parse either format, though for xls it depends on Coro, which may not work on the latest version of perl, and so it may not fit your "least dependencies" requirement (or may not work at all).

      Thanks runrig, let's just assume the most recent type of Excel document (xlsx afaik). I am not up to speed on MS file formats.

Re: Recommendation on an Excel parser
by MidLifeXis (Monsignor) on Oct 07, 2015 at 12:30 UTC

    I have used Spreadsheet::Read with some level of success. It at least unifies the data structure/api pulled from the file types it knows how to read.

    --MidLifeXis