Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Sort CSV file within Excel based on specific column

by runrig (Abbot)
on Oct 11, 2012 at 20:34 UTC ( #998537=note: print w/ replies, xml ) Need Help??


in reply to Sort CSV file within Excel based on specific column

No need to open a CSV file in Excel. Use Text::CSV/Text::CSV_XS. Read read the lines, put then in a hash keyed by your sort column, sort the keys, and print the lines.


Comment on Re: Sort CSV file within Excel based on specific column
Re^2: Sort CSV file within Excel based on specific column
by Kenosis (Priest) on Oct 11, 2012 at 21:05 UTC

    ...put then in a hash keyed by your sort column...

    Done this way, wouldn't the OP lose a csv row if two entries from the sort column are the same?

      Yes, I suppose the hash is unnecessary.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-17 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (40 votes), past polls