RE: win32::ole (excel) question

2007-08-10 Thread dkazatsky

Hi Jan,

You're abolutely right - I forgot I had changed the name I was using to set
Sheet1.  I changed to a shorter length and it's running perfect.

Thanks much.

Dave Kazatsky
Senior Middleware Engineer
NSE - Solutions Engineering
W. (732) 893-4351
C. (973) 865-8106


   
 Jan Dubois  
 [EMAIL PROTECTED] 
 .com  To 
   [EMAIL PROTECTED],  
 08/10/2007 02:22  [EMAIL PROTECTED] 
 PMte.com  
cc 
   
   Subject 
   RE: win32::ole (excel) question 
   
   
   
   
   
   




The first sheet name is never changed from “Sheet1” to begin with because
you are trying to set it to a name with 37 characters. The maximum sheet
name length in Excel is 31 characters.

It would be nice if Excel returned an error if you try to assign an invalid
name, but it doesn’t appear to do so.

Cheers,
-Jan

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: August 10, 2007 10:30 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: win32::ole (excel) question



Hi all,

Weird situation with creating new worksheets and keeping the title in the
tab. I f I create just one everything is fine - when I add a second
worksheet to the workbook the title goes away from the original worksheet.

Code excerpt:

This is where the object is instanciated and the first worksheet is created
and named:

#--create and open the first worksheet
my $excel = Win32::OLE-new(Excel.Application);
$excel-{Visible} = 1;
my $book = $excel-Workbooks-Add;
my $sheet = $book-Worksheets(1);
$sheet-{Name} = Daily Message Volume By Queue Manager;

**cells are filled in and formatted - everything looks great to this point

Here'e where the next worksheet is added:

#--create and open the second worksheet
$sheet = $book-Worksheets-Add;
$sheet-{Name} = Daily Message Volume By Queue;
$sheet-Columns-{ColumnWidth} = 24;

**When this worksheet is created the first worksheet goes back to being
named Sheet1

Any thoughts greatly appreciated.

Thanks in advance.


Dave Kazatsky
Senior Middleware Engineer
NSE - Solutions Engineering
W. (732) 893-4351
C. (973) 865-8106
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.
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.
inline: graycol.gifinline: pic26421.gifinline: ecblank.gif___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: win32::ole (excel) question

2007-08-10 Thread Jan Dubois
The first sheet name is never changed from Sheet1 to begin with because you 
are trying to set it to a name with 37 characters. The
maximum sheet name length in Excel is 31 characters.

 

It would be nice if Excel returned an error if you try to assign an invalid 
name, but it doesn't appear to do so.

 

Cheers,

-Jan

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: August 10, 2007 10:30 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: win32::ole (excel) question

 

Hi all,

Weird situation with creating new worksheets and keeping the title in the tab. 
I f I create just one everything is fine - when I add
a second worksheet to the workbook the title goes away from the original 
worksheet.

Code excerpt:

This is where the object is instanciated and the first worksheet is created and 
named:

#--create and open the first worksheet
my $excel = Win32::OLE-new(Excel.Application);
$excel-{Visible} = 1;
my $book = $excel-Workbooks-Add;
my $sheet = $book-Worksheets(1);
$sheet-{Name} = Daily Message Volume By Queue Manager;

**cells are filled in and formatted - everything looks great to this point

Here'e where the next worksheet is added:

#--create and open the second worksheet
$sheet = $book-Worksheets-Add;
$sheet-{Name} = Daily Message Volume By Queue;
$sheet-Columns-{ColumnWidth} = 24;

**When this worksheet is created the first worksheet goes back to being named 
Sheet1

Any thoughts greatly appreciated.

Thanks in advance.


Dave Kazatsky
Senior Middleware Engineer
NSE - Solutions Engineering
W. (732) 893-4351
C. (973) 865-8106 

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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs