If everything is saved correctly inside a dir called c:\perl\scripts,
the following subs return the same info..  But based on different
argument positions...  

I'd say you have a code issue.  Try comparing your code to the attached
code.  As well, when trying to help you debug your code, it usually
helps to post the relevant sections of your script.  Please do so in the
future.  Are you sure you're parsing your argument list correctly in the
sub?  That's what I'd check first.  The attached code works fine on my
system.

Steven

Output:
-----------------------------------
C:\Perl\Scripts>perl testexcel.pl
from 1:
1-A1= This is good 1
2-A1= This is Good 2
this2 - this2
this - this
arr that
arr that2
from 2:
1-A1= This is good 1
2-A1= This is Good 2
this2 - this2
this - this
arr that
arr that2

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Hon Shi
Sent: Monday, December 12, 2005 7:02 AM
To: [email protected]
Subject: #2 sequnce rules to passing subroutine parameters?

typos, sorry

fail:
subA($wookbook->Worksheets("Sheet1"), \%arrayA, [EMAIL PROTECTED],
     $workbook->Worksheets("Sheet2"));

works fine:
subA($wookbook->Worksheets("Sheet1"),
     $workbook->Worksheets("Sheet2"),\%arrayA, [EMAIL PROTECTED]);

When I try to pass the second sheet into the subroutine in any position
but as the second parameter the sub fails with an ole message saying
there is no object or it requires a package reference.

I have tried 50 permutations on this.  Must you pass multiple excel
objects in sequence? 

Am I sure I'm not doing something wrong?  Of course not! :-)





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com _______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Attachment: testbook.xls
Description: testbook.xls

Attachment: testexcel.pl
Description: testexcel.pl

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to