Removing the () seems to work, but only if I am adding one worksheet. I am using a For Loop to add multiple sheets, but all the other sheets are default named "Sheet2", "Sheet3", etc... So, some more investigation.
Thanks, David -----Original Message----- From: Dave Kazatsky [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 1:47 PM To: Hsu, David Cc: [email protected]; [EMAIL PROTECTED] Subject: RE: Win32:OLE Excel David, I have a script with almost the exact same code and it works correctly. Try removing the parens from your add statement and see if that makes a difference. Original Code: $Worksheet = $Workbook->Worksheets()->Add(); $Worksheet->{Name} = "test $i"; Becomes: $Worksheet = $Workbook->Worksheets->Add; $Worksheet->{Name} = "test $i"; HTH. Dave Kazatsky Senior Middleware Engineer W. (908) 575-6947 C. (973) 865-8106 |---------+-------------------------------------------------> | | "Hsu, David" <[EMAIL PROTECTED]> | | | Sent by: | | | [EMAIL PROTECTED]| | | veState.com | | | | | | | | | 08/04/2005 01:17 PM | | | | |---------+-------------------------------------------------> >----------------------------------------------------------------------- -----------------------| | | | To: "Ken Barker" <[EMAIL PROTECTED]>, | | [email protected] | | cc: | | Subject: RE: Win32:OLE Excel | >----------------------------------------------------------------------- -----------------------| Ken, I am using Win32::OLE. Add_worksheet uses the Spreadsheet:WriteExcel module. Thanks, David -----Original Message----- From: Ken Barker [mailto:[EMAIL PROTECTED] Sent: Thursday, August 04, 2005 12:07 PM To: Hsu, David; [email protected] Subject: RE: Win32:OLE Excel Try $ws1 = $workbook->add_worksheet('worksheetname'); Ken Barker IT Lead Americall Group, Inc 314-213-7927 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hsu, David Sent: Thursday, August 04, 2005 10:23 AM To: [email protected] Subject: Win32:OLE Excel Hi, Does someone know of another method of naming the Excel sheets? Currently I am using: ... $Worksheet = $Workbook->Worksheets()->Add(); $Worksheet->{Name} = "test $i"; ... The sheet names are still "Sheet1", "Sheet2", etc... Thanks, David _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ______________________________________________________________________ This e-mail has been scanned by MCI Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on MCI's Managed Email Content Service, visit http://www.mci.com. ______________________________________________________________________ _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message. _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
