.------[ [EMAIL PROTECTED] wrote (2003/03/05 at 11:21:20) ]------ | | im trying to use Spreadsheet::ParseExcel::Simple to return the name of the | worksheet. | but all i get is something such as: | Spreadsheet::ParseExcel::Simple::_Sheet=HASH(0x39b8918) | | what am i doing wrong? | | code: | | use strict; | use Spreadsheet::ParseExcel::Simple; | my $wkbook = "x:/traffic/temp_assay/site.xls"; | | my (@sheets,$dest,$sheet,$year,$date,@wktemp,$ath,$bth,$cth); | my $xls = Spreadsheet::ParseExcel::Simple->read("$wkbook"); | foreach my $sheet ($xls->sheets) { | @sheets = $xls->sheets; | while ($sheet->has_data) { | my @data = $sheet->next_row; | my $sheet = $sheets[0]; | print "$sheet\n"; | } | `-------------------------------------------------
I haven't looked at this much, but I'm betting it has to do with the fact you use several different my'ed versions of the scalar '$sheet' throughout. Try naming them something unique based upon what they hold and I bet you'll work your own problem out. --------------------------------- Frank Wiles <[EMAIL PROTECTED]> http://frank.wiles.org --------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]