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

Dear All

I need to extract data from an excel file. Data that I need from excel are either a whole column/row or a bit of it, I might also need more then one column or rows off various sheets in the workbook, the data extracted will populate either an @array of a %hash. May question is which is the best module to use here, Win32::OLE, OLE, ODBC, or DBI.

Many Thanks.

Replies are listed 'Best First'.
Re: Extracting data from an excel file
by Tanalis (Curate) on Jun 26, 2003 at 08:32 UTC
      Thanks for that, but I don't think I have the module Spreadsheet::ParseExcel installed on my PC. Because I get this msg;

      Can't locate Spreadsheet/ParseExcel.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:\scripts\test.pl line 2.
      BEGIN failed--compilation aborted at C:\scripts\test.pl line 2.

      I also have a problem with using PPM. Every time I type ppm i get this error,

      C:\>ppm
      The name specified is not recognised as an Internal or external command, operable program or batch file.

      then I add the extension .bat and I try it as ppm.bat. But I get the following error,

      C:\>ppm.bat
      The name specified is not recognised as an Internal or external command, operable program or batch file.
      You do not have Perl in your PATH.

      here I check the path and I get,

      C:\>path
      PATH=C:\Perl\bin\;C:\Perl\;C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\scripts;

      I checked file association and the Path in Winnt Environment all seemed OK. I installed/uninstalled/reinstalled PERL few times and rebooted few times, all to no avail. So do you know where I can download the zipped version of this library or how can I sort this PPM problem please.

      Cheers.
        That is mongo strange.

        Have you tried giving it the full path? I.e.

        C:\Perl\bin\ppm

        Or, since it says that you do not have *Perl* in your path,

        C:\>perl -V

        Also, note that if you do get ppm to run, you may need to set the HTTP_PROXY variable for it as described in perldoc PPM


        --
        Regards,
        Helgi Briem
        helgi DOT briem AT decode DOT is

Re: Extracting data from an excel file
by zby (Vicar) on Jun 26, 2003 at 10:10 UTC
    The Spreadsheet::ParseExcel was allready mentioned - I've found it is a bit slow, and for my daily work I do the obvious workaround: export the data from Excell to text tab delimited and then work with it using Perl, when done import it to Excell from tab delimited.