[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

12/17/2003 at 07:39AM PST, ID: 20828314
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

When running this one script I get an microsoft error saying "Perl Command Line Interpreter has encountered a problem and needs to close.  We are sorry for the inconvenience."

Asked by turn123 in Perl Programming Language

Tags: line, command, needs, rowrange, sheet

I need to know how to fix it.

The script is

use Win32::OLE;

print $test;
my %wood = (
"H"      => 0,
"P"      => 1,
"M"      => 2,
"O"      => 3,
"C"      => 4,
"R"      => 5,
"HM"      => 6,
"W"      => 7,
"A"      => 8,
"DISC"      => 20,
);

my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
    || Win32::OLE->new('Excel.Application', 'Quit');

my $Book = $Excel->Workbooks->Open("c:/testing/custom_overuns.xls");

my $Sheet = $Book->Worksheets(1);

$rg= $Sheet->{UsedRange};
$rowrange= $rg->Rows->Count;

$b=0;
$c=1;
for ($a=1;$a<$rowrange+1;$a++) { $cell = $Sheet->Range("A$a")->{Value}; next unless $cell eq 'Part Number:';
      $c=$a+1; $d=$a+2; $e=$a+3; $f=$a+4; $g=$a+5; $h=$a+6; $i=$a+7;

      $b = $1.$wood{$2} if $Sheet->Range("B$a")->{Value} =~ /(\d+)(\w+?)([DISC]{0,4})/; $b .= $wood{$3} if defined $3;
      $part[$b] = $Sheet->Range("B$a")->{Value};
      $height[$b] = $Sheet->Range("B$c")->{Value};
      $width[$b] = $Sheet->Range("B$d")->{Value};
      $sqheight[$b] = $Sheet->Range("B$e")->{Value};
      $weight[$b] = $Sheet->Range("B$f")->{Value};
      $wood[$b] = $Sheet->Range("B$g")->{Value};
      $quan[$b] = $Sheet->Range("B$h")->{Value};
      $note[$b] = $Sheet->Range("B$i")->{Value};
      $heigh = $b unless $heigh > $b;

      $b = $1.$wood{$2} if $Sheet->Range("E$a")->{Value} =~ /(\d+)(\w+?)([DISC]{0,4})/; $b .= $wood{$3} if defined $3;
      $part[$b] = $Sheet->Range("E$a")->{Value};
      $height[$b] = $Sheet->Range("E$c")->{Value};
      $width[$b] = $Sheet->Range("E$d")->{Value};
      $sqheight[$b] = $Sheet->Range("E$e")->{Value};
      $weight[$b] = $Sheet->Range("E$f")->{Value};
      $wood[$b] = $Sheet->Range("E$g")->{Value};
      $quan[$b] = $Sheet->Range("E$h")->{Value};
      $note[$b] = $Sheet->Range("E$i")->{Value};
      $heigh = $b unless $heigh > $b;

      $b = $1.$wood{$2} if $Sheet->Range("H$a")->{Value} =~ /(\d+)(\w+?)([DISC]{0,4})/; $b .= $wood{$3} if defined $3;
      $part[$b] = $Sheet->Range("H$a")->{Value};
      $height[$b] = $Sheet->Range("H$c")->{Value};
      $width[$b] = $Sheet->Range("H$d")->{Value};
      $sqheight[$b] = $Sheet->Range("H$e")->{Value};
      $weight[$b] = $Sheet->Range("H$f")->{Value};
      $wood[$b] = $Sheet->Range("H$g")->{Value};
      $quan[$b] = $Sheet->Range("H$h")->{Value};
      $note[$b] = $Sheet->Range("H$i")->{Value};
      $heigh = $b unless $heigh > $b;

};
$Book->Close;
system 'del custom_overuns.old';
system 'rename custom_overuns.xls custom_overuns.old';

my $Book = $Excel->Workbooks->Add;
$Book->SaveAs('c:\testing\custom_overuns.xls');
my $Sheet = $Book->Worksheets(1);
$b=0;
$c=1;
for ($a=1;$a<$heigh;$a++) {
      next unless defined $part[$a];
      print $part[$a]."\n";
      $b++;
      if ($b < 6) {
            $Sheet->Range("A$c")->{Value} = "Part Number:";
            $Sheet->Range("B$c")->{Value} = "$part[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Height::";
            $Sheet->Range("B$c")->{Value} = "$height[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Width:";
            $Sheet->Range("B$c")->{Value} = "$width[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Square Height:";
            $Sheet->Range("B$c")->{Value} = "$sqheight[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Weight:";
            $Sheet->Range("B$c")->{Value} = "$weight[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Wood:";
            $Sheet->Range("B$c")->{Value} = "$wood[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Quantity:";
            $Sheet->Range("B$c")->{Value} = "$quan[$a]";$c++;
            $Sheet->Range("A$c")->{Value} = "Note:";
            $Sheet->Range("B$c")->{Value} = "$note[$a]";$c++;
            $Sheet->Range("B$c")->{Value} = "";$c++;
            $c -= 45 if $b == 5;

      } elsif ($b < 11) {
            $Sheet->Range("D$c")->{Value} = "Part Number:";
            $Sheet->Range("E$c")->{Value} = "$part[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Height::";
            $Sheet->Range("E$c")->{Value} = "$height[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Width:";
            $Sheet->Range("E$c")->{Value} = "$width[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Square Height:";
            $Sheet->Range("E$c")->{Value} = "$sqheight[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Weight:";
            $Sheet->Range("E$c")->{Value} = "$weight[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Wood:";
            $Sheet->Range("E$c")->{Value} = "$wood[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Quantity:";
            $Sheet->Range("E$c")->{Value} = "$quan[$a]";$c++;
            $Sheet->Range("D$c")->{Value} = "Note:";
            $Sheet->Range("E$c")->{Value} = "$note[$a]";$c++;
            $Sheet->Range("E$c")->{Value} = "";$c++;

            $c -= 45 if $b == 10;

            } else {
            $Sheet->Range("G$c")->{Value} = "Part Number:";
            $Sheet->Range("H$c")->{Value} = "$part[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Height::";
            $Sheet->Range("H$c")->{Value} = "$height[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Width:";
            $Sheet->Range("H$c")->{Value} = "$width[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Square Height:";
            $Sheet->Range("H$c")->{Value} = "$sqheight[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Weight:";
            $Sheet->Range("H$c")->{Value} = "$weight[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Wood:";
            $Sheet->Range("H$c")->{Value} = "$wood[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Quantity:";
            $Sheet->Range("H$c")->{Value} = "$quan[$a]";$c++;
            $Sheet->Range("G$c")->{Value} = "Note:";
            $Sheet->Range("H$c")->{Value} = "$note[$a]";$c++;
            $Sheet->Range("H$c")->{Value} = "";$c++;

            $b=0 if $b == 15;
      }
}


$Book->Save;
$Book->Close;

The error signiture is

AppName: perl.exe       AppVer: 5.8.2.808       ModName: perl58.dll
ModVer: 5.8.2.808       Offset: 000872e1

[+][-]12/17/03 07:51 AM, ID: 9957374

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/17/03 09:12 AM, ID: 9958006

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 09:13 AM, ID: 9958014

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 11:41 AM, ID: 9959040

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/17/03 12:32 PM, ID: 9959436

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 12:33 PM, ID: 9959449

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 12:49 PM, ID: 9959560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/17/03 01:11 PM, ID: 9959718

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 01:18 PM, ID: 9959801

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/17/03 02:10 PM, ID: 9960250

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/18/03 06:22 AM, ID: 9964244

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: line, command, needs, rowrange, sheet
Sign Up Now!
Solution Provided By: arjanh
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12/18/03 06:49 AM, ID: 9964430

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/18/03 06:51 AM, ID: 9964448

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74