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

I have a spread sheet which contains Date in B15 (assume). And a value in AJ15 (assume). I want to fetch that value using date. I read the module

Spreadsheet-ParseExcel

. In that i saw

  my $cell = $worksheet->get_cell($row, $col);

Here i only guarantee the column number but not the row. So i want to search the date in which row it present. What function i have to use for that.

Replies are listed 'Best First'.
Re: Searching a string in excel sheets
by pme (Monsignor) on Aug 10, 2015 at 10:24 UTC
    As you can see in the 'synopsis' part of Spreadsheet::ParseExcel you can get the column range of a given worksheet using:
    my ( $col_min, $col_max ) = $worksheet->col_range();
    and then go along using 'for':
    for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); ... }
      http://www.perlmonks.org/?node_id=1121108

      I saw that module and tried the example. It returns the same error which metioned in the above node.

      Error: No Excel data found in file.

      There someone suggested use Win32::OLE. We cant do this using Spreadsheet::ParseExcel ???

        That error code means that the file you passed to your program was not in a format understood by Spreadsheet::ParseExcel. Maybe your file is not an .xls file?