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

I want to know the Method to Find the Cell value(row,Column value) in the Table of the Word Document based on the value. I want the Given text value (string) to be searched in the Table of the Word Document. and i Want its Cell(rowxColumn) Value to use it as a reference to do further operations based on that. Any help is appreciated.

Replies are listed 'Best First'.
Re: Win32::OLE Find in Table method
by hdb (Monsignor) on Oct 29, 2013 at 07:11 UTC

    If $table stores the table object in Word, then the following code looks for a particular $pattern:

    for my $i (1..$table->Rows->Count) { for my $j (1..$table->Columns->Count) { my $text = $table->Cell($i,$j)->Range->Text; print "($i:$j) $text\n" if $text =~ /$pattern/; } }
      Thank you HDB..Its Perfect.
      It would be very helpful to me if you give the way to find the Methods Available for Table Processing and the way to use it as i will be majorly doing on Table Processing in Perl. Thanks in Advance.

        That does not exist to my knowledge. What you need to do is to familiarize yourself with the VBA object model (especially the object browser in the MS Office programs is useful) and learn how to translate VBA into Perl. PerlMonks has a lot of material on this. If you search for "Win32::OLE" you will find many helpful posts.