ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
Spreadsheet-WriteExcel
by Miguel Demaerel other posts by this author
Jan 31 2003 9:52AM messages near this date
view in the new Beta List Site
RE: Determing if a file has changed | Re: Spreadsheet-WriteExcel
Hoi perl gurus

I have a question I can't solve.
I won't to assign a variable to a sheet name.
For example; if I choose 1 it write to sheet Jan, if I choose  2 it will write to sheet Feb 
...

But I can't assign the $sheet=Jan.
I get thet error...


use Spreadsheet::WriteExcel;
use strict;


# Create Excel workbook and sheets
my $workbook = Spreadsheet::WriteExcel-> new("perl.xls");
my $Jan = $workbook-> addworksheet("January");
my $Feb = $workbook-> addworksheet("February");
my $Mar = $workbook-> addworksheet("March");...

....

# Asking the period.
print "Give the period: "; my $PERIOD = <STDIN> ; chomp $PERIOD;
if ( $PERIOD=~ /1/ )
{
    my $sheet = 'Jan';
}

....

$$sheet-> write(0,1,"NA_NAME"); #I wont to write to sheet Jan, but I can't assign $sheet to t
he object sheet.

...

# close the connections
$workbook-> close();

Thanks in advance.

Greetings Miguel



                                      /////
                                     (o o)
==============oOO==(_)==OOo==============
                            Miguel Demaerel
                     System Engineer - SCSA
                             Schlumberger
   Email Miguel.Demaerel@[...].COM
=========================================


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Miguel Demaerel
$Bill Luebkert

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved