Hi;

Don't most OO structures require constructor and destructor methods? Seems to me this is OK for OO. Requiring the Workbook to delete the Worksheet leads to a different problem...that of a WorkBook with no Worksheets. Since the raison d'etre for a WorkBook is as a container for WorkSheets, the coding to account for that could be even worse.

Just my 2 cents worth.

Later,


John Wunderlich

Program Manager, Compliance
Directeur de Programme, Conformité
Tel/Fax: 514-908-3094

Ceridian

www.ceridian.ca



Lyle Kopnicky <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

01/24/2005 05:29 PM

To
Perl-Win32-Users@listserv.ActiveState.com
cc
Subject
Re: Deleting a worksheet in Excel





Hsu, David wrote:

> Hi,
> Can someone let me know the syntax of deleting a worksheet in an Excel
> workbook.  I am using Win32::OLE.
> I've tried:
> $Workbook->Worksheets{9}.Delete;
>  
> Thanks,
> David

This is an aside, not an attempt to answer your question, but:

Doesn't anyone think it's a bit odd to tell a Worksheet to delete
itself?  It's like asking someone to shoot themselves and then bury
themselves.  The object has no context to do such a thing.  Shouldn't we
be telling the Workbook to delete the Worksheet?  Something like
$Workbook->DeleteWorksheet(9)?

Bill Gates, are you listening?  You are violating OO common sense!

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




***********************************************************************************
This communication is intended to be received only by the individual(s) or entity(s) to whom or to which it is addressed, and contains information which is confidential, privileged and subject to copyright. Any unauthorized use, copying, review or disclosure is prohibited. Please notify the sender immediately if you have received this communication in error (by calling collect, if necessary) so that we can arrange for its return at our expense. Thank you in advance for your anticipated assistance and cooperation.

Ce document est destinee aux seuls destinataires designes, personne ou groupe. Cette telecopie contient des renseignements confidentiels et est regie par les lois sur le droit d'auteur. Toute utilisation, copie, revue ou divulgation non autorisee de la presente est formellement interdite. Si vous avez recu cette telecopie et qu'elle ne vous etait pas destinee, veuillez communiquer immediatement avec l'expediteur, a frais vires si necessaire, afin que nous puissions prendre des dispositions a nos frais pour la recuperer. Nous vous remercions a l'avance de votre cooperation diligente.
***********************************************************************************
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to