Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: excel to hash

by Discipulus (Monsignor)
on Sep 13, 2017 at 17:05 UTC ( #1199337=note: print w/replies, xml ) Need Help??


in reply to Re^2: excel to hash
in thread excel to hash

See my above answer about .xls vs .xlsx files. What are you asking now is a simple hash operation: you must assign to each key the inner contained value:

# quotes needed even with fat comma or +you get 1 instead of 001 perl -MData::Dumper -e "%hash=('001'=>{Name=>'AAA'}); foreach $k (keys + %hash){$hash{$k}=$hash{$k}{Name}} print Dumper \%hash" $VAR1 = { '001' => 'AAA' };

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199337]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-11-25 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (355 votes). Check out past polls.

    Notices?