Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^13: Iterating Through Cell Blocks with Spreadsheet::Read

by AnomalousMonk (Archbishop)
on Oct 09, 2013 at 06:18 UTC ( #1057487=note: print w/replies, xml ) Need Help??


in reply to Re^12: Iterating Through Cell Blocks with Spreadsheet::Read
in thread Iterating Through Cell Blocks with Spreadsheet::Read

I'm not at all familiar with Spreadsheet::Read (in fact, I'm not greatly familiar with spreadsheets in general), but the code you show seems close to being workable. Do this:

  • Get rid of the whole
        my %sheet = ();
    statement. In the code you show, it seems to be doing nothing more than confusing the heck out of you.
  • The  foreach (@x) { ... } loop seems OK for looping over the values of the  @x array, with the  $_ default scalar being "topicalized" to each column-name string in turn.
  • Form the cell name as has been discussed and access the cell within the  $sheet hash reference (I'm assuming this is a valid operation) using the  -> arrow operator, e.g.
        $name = $sheet->{"${_}28"};
    or perhaps
        $name = $sheet->{$_ . '28'};
  • Report results. Don't just say "it doesn't work", that's almost useless. Describe your expectations and report how the code fails to meet your expectations. Report exact warning or error messages.
  • Ponder the Basic debugging checklist.

Good luck.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1057487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-12-04 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?