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


RE: Win32:OLE Excel

2005-08-05 Thread Hsu, David
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: Perl-Win32-Users@listserv.ActiveState.com;
[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],
|
  |Perl-Win32-Users@listserv.ActiveState.com
|
  |   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; Perl-Win32-Users@listserv.ActiveState.com
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: Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32:OLE Excel

2005-08-05 Thread Ross Matt-QMR000
Dave,
I attack this a little differently, I allow the excel to create sheet1
sheet2 and sheet3. which I believe are created by default. First create all
the sheets that you need by looping around

$Sheet   = $Book-Worksheets-Add;
$Sheet-{Name}   = $NEW_NAME;

Then delete all the sheets that start with sheet

$SheetTabName  = $Book- Worksheets($_)-{Name};
foreach ( 1...$SheetCnt)
{
$SheetTabName  = $Book- Worksheets($_)-{Name};
if  ( $SheetTabName =~ /^sheet/i )
{
$Book-Worksheets($SheetTabName)-Delete;
}
}

Later,
Matt Ross
Motorola
Configuration Management ePIMS

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hsu,
David
Sent: Friday, August 05, 2005 7:58 AM
To: Dave Kazatsky
Cc: Perl-Win32-Users@listserv.ActiveState.com;
[EMAIL PROTECTED]
Subject: RE: Win32:OLE Excel

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: Perl-Win32-Users@listserv.ActiveState.com;
[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],
|
  |Perl-Win32-Users@listserv.ActiveState.com
|
  |   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; Perl-Win32-Users@listserv.ActiveState.com
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: Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman

RE: Win32:OLE Excel

2005-08-05 Thread Thomas, Mark - BLS CTR
 
 Then delete all the sheets that start with sheet
 
 $SheetTabName  = $Book- Worksheets($_)-{Name};
 foreach ( 1...$SheetCnt)
 {
 $SheetTabName  = $Book- Worksheets($_)-{Name};
 if  ( $SheetTabName =~ /^sheet/i )
 {
 $Book-Worksheets($SheetTabName)-Delete;
 }
 }
 

Or just

$Book-Worksheets(Sheet $_)-Delete for 1..3;

--
Mark.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32:OLE Excel

2005-08-04 Thread Ken Barker
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: Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32:OLE Excel

2005-08-04 Thread $Bill Luebkert
Hsu, David wrote:
 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...

my $workbook = $Excel-Workbooks-Add();
my $worksheet = $workbook-Worksheets(1);
$worksheet-{Name} = First Sheet;

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32:OLE Excel

2005-08-04 Thread Hsu, David
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; Perl-Win32-Users@listserv.ActiveState.com
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: Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32:OLE Excel

2005-08-04 Thread dkazatsky

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]










Hsu, David [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
08/04/2005 01:17 PM




	
	To:	Ken Barker [EMAIL PROTECTED], Perl-Win32-Users@listserv.ActiveState.com
	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; Perl-Win32-Users@listserv.ActiveState.com
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]]On Behalf Of
Hsu, David
Sent: Thursday, August 04, 2005 10:23 AM
To: Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
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
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32-OLE excel cell reference.

2003-08-14 Thread $Bill Luebkert
Beckett Richard-qswi266 wrote:

 Guys,
 
 I'm struggling with the syntax to point to the cells that I want to use in
 Excel.
 
 It seems that the Range command likes data like (A14), or (A14:B26), and I
 am happy with this.
 
 My problem occurrs when I only have numeric data to work with, because of
 incremented counters, or Count commands.
 
 I have had success with Cells(1,14), but I cannot for the life of me work
 out how to reference an area of cells like this...
 
 Cells(1,14:5,28)
 
 Can anyone help me with the correct syntax, please?

I think it's just the UL and LR corners:

my $cellsobj = $worksheet-Range(C7:E12);

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32-OLE excel cell reference.

2003-08-14 Thread Ross Matt-QMR000
Chuck,

That worked for me but when processing a large excel workbook the
Cell call seems to be slower than Converting the number into letter and then
use a pure range.  I had a 2X reduction in time processing 20,000 rows by 25
columns. However on the smaller size sheets there was no noticable differnce
in time between the two methods.

Later,

Matt Ross
Configuration Management ePIMS
Wk: 847.772.6754
2 way pager: 888.468.0815
E-mail:  [EMAIL PROTECTED]

-Original Message-
From: Charbeneau, Chuck [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 8:27 AM
To: 'Beckett Richard-qswi266'; [EMAIL PROTECTED]
Subject: RE: Win32-OLE excel cell reference.



 From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED] 
 Subject: Win32-OLE excel cell reference.


 It seems that the Range command likes data like (A14), or 
 (A14:B26), and I am happy with this.
 
 My problem occurrs when I only have numeric data to work 
 with, because of incremented counters, or Count commands.
 
 I have had success with Cells(1,14), but I cannot for the 
 life of me work out how to reference an area of cells like this...
 
 Cells(1,14:5,28)


You have to use the range and cells object together, like so:

code

$Sheet1-Range($Sheet1-Cells(1,14), $Sheet1-Cells(5,28))-Select();

/code

Chuck Charbeneau
Lear Corporation
Lead Software Applications Engineer
ccharbeneau at lear dot com

**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32-OLE excel cell reference.

2003-08-10 Thread Charbeneau, Chuck

 From: Ross Matt-QMR000 [mailto:[EMAIL PROTECTED] 
 Subject: RE: Win32-OLE excel cell reference.

 by no means did mean anything negative about what you 
 wrote in reply. You have ALWAYS been very helpful to me and 
 others with your posts. 


No worries.  I didn't take any offense, just offering a little more info to
the mix regarding using Cell and Range.  If the user could only use ints,
then Cell is the only way he could go.  Personally, I would have just
converted to letters and used a multiple entry range

$Sheet-Range(a1:c3, r5, c5:t3)-SOMETHING

 but be that as it may.

I have pretty thick skin and will usually throw the bozo bit before I get
too rankled anyway.

Keep up the good work,

Chuck Charbeneau
Lear Corporation
Lead Software Applications Engineer
ccharbeneau at lear dot com

**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32-OLE excel cell reference.

2003-08-10 Thread Charbeneau, Chuck

 From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED] 
 Subject: Win32-OLE excel cell reference.


 It seems that the Range command likes data like (A14), or 
 (A14:B26), and I am happy with this.
 
 My problem occurrs when I only have numeric data to work 
 with, because of incremented counters, or Count commands.
 
 I have had success with Cells(1,14), but I cannot for the 
 life of me work out how to reference an area of cells like this...
 
 Cells(1,14:5,28)


You have to use the range and cells object together, like so:

code

$Sheet1-Range($Sheet1-Cells(1,14), $Sheet1-Cells(5,28))-Select();

/code

Chuck Charbeneau
Lear Corporation
Lead Software Applications Engineer
ccharbeneau at lear dot com

**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::OLE, excel file not found

2003-06-18 Thread Allegakoen, Justin Devanandan
--8---
If you'll notice, the code provided was wrapped in % % which indicates
SERVER side execution.
--8---

Feel the need for a little defence on my part ;)

There's no point in trying to execute server side code in the faint hope
that it will open your local file. I've made that mistake in the past :p

I did notice Emma's use of use strict, but realised that she didn't use
the ASP module to call it:-

use strict;
use Win32::ASP qw(:strict); 

Or even

use strict;
use vars qw( $Request $Response ); # Thanks Matt!

For what Emma had written, use strict by itself would have worked, but
I'm pretty sure that this code is part of something bigger in which case
the use/creation of ASP objects would have puked all over the page.

My point? I _thought_ Emma with her use of strict was a newbie, I
_overlooked_ the fact that she hadn't called any ASP objects.

Anyway with the newbie frame of thought firmly seeded in my brain, I had
further assumed that she made the assumption that server side script
will find her locally stored file, if indeed she did have or wanted that
setup.

Emma, point to note. You don't help yourself out in your code, you
should really have this:

my $Book = $Excel-Workbooks-Open(c:/Temp/Test2.xls) or die BRCant
open my Excel file, boohoo!;

And if you do use ASP; (I found that it works better that Win32::ASP)
you will be able to print, warn, and die gracefully without any
fatalities to the browser.

That's quite enough young man! I think I'll shut up now.

Just in
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs