S
sdfgsd
Hello All,
Here's the code. As you can see, I've put a range of excel values into the
array $cells. Before proceeding, I need to access one or two specific values
that remain constant in their location within the array.
My problem: I can't seem to understand how to access a specific
value/element in the array. See comment in the code. Thanks for any help.
========================================
my $cells = $worksheet->Range("A1
22")->{'Value'};
print "The content of this cell is: ", $@cells[0][2];
^^^^^^^^^^^
# According to the books and perldoc, this should work, but it doesn't?
foreach my $row (@$cells) {
foreach my $rec (@$row) {
$rec =~ s/^\s+//;
$rec =~ s/\s+$//;
$rec =~ s/[^a-zA-Z0-9 .-]//g;
print "$rec\n";
}
}
Here's the code. As you can see, I've put a range of excel values into the
array $cells. Before proceeding, I need to access one or two specific values
that remain constant in their location within the array.
My problem: I can't seem to understand how to access a specific
value/element in the array. See comment in the code. Thanks for any help.
========================================
my $cells = $worksheet->Range("A1
print "The content of this cell is: ", $@cells[0][2];
^^^^^^^^^^^
# According to the books and perldoc, this should work, but it doesn't?
foreach my $row (@$cells) {
foreach my $rec (@$row) {
$rec =~ s/^\s+//;
$rec =~ s/\s+$//;
$rec =~ s/[^a-zA-Z0-9 .-]//g;
print "$rec\n";
}
}