basicdez has asked for the wisdom of the Perl Monks concerning the following question:
Please help me out and let me know what the general process is when using this Win32::OLE process. I believe that I know it, but want to check it against all of the wisdom that is willing to help me out.
I forgot to put this in, but what is the value of 0 and 1 in the form of the Worksheet format. I believe that they just get concatenated with the next set of values, but really want to make sure.{ $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{'Visible'} = 0; $book = $Excel->Workbooks->Open("$dirpath\\$xls"); $worksheet = $book->Worksheets(1); $row = 0; $read_xls++; while ($read_xls) { $row++; $excel_data = $worksheet->Range("A$row:Z$row")->{'Value'}; $col1_data = $excel_data->[0][0]; $col2_data = $excel_data->[0][1]; $col1_data =~ s/\s*$//; $col2_data =~ s/\s*$//; if ($col1_data =~ /^MDLS/i) { $found_mdls++; $col = 0; } next unless $found_mdls; unless ($col1_data) { $found_mdls = ""; $read_xls = ""; last; } $model = $col1_data; $spec = $col2_data; $prod2 = $model; $Excel->Workbooks->Close(); }
just so you all know, this has been a painful post for me. I have felt stupid, then smart, then stupid all over again. I do know now what I was looking for and have figured out the flow of this program. I was on the right track and thanks to a few kind monks, I have found my way with this program.
Although, I have learned that this place is majorly competive and I am not one of the top monks, I am humble enough to carry forward and ask another question if I need to, in order to get the help that I need.
Peace, ((love)) and Code
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Simple Question - Simple Answer, I hope.
by amarquis (Curate) on Mar 24, 2008 at 15:12 UTC | |
Re: Simple Question - Simple Answer, I hope.
by NetWallah (Canon) on Mar 24, 2008 at 17:25 UTC |
Back to
Seekers of Perl Wisdom