Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Deleting Duplicate Values in Excel

by stallion (Acolyte)
on Feb 08, 2012 at 13:53 UTC ( #952503=perlquestion: print w/ replies, xml ) Need Help??
stallion has asked for the wisdom of the Perl Monks concerning the following question:

Im a newbie to perl .There is an excel sheet which has the o/p as below:

s.no tags check1 init check2 hi check1 init check3 fun check2 hi check3 sun check4 data

How to delete duplicate values using perl? is it possible?

pls help...

the output should be like this

s.no tags check1 init check2 hi check3 fun check4 data

Comment on Deleting Duplicate Values in Excel
Select or Download Code
Re: Deleting Duplicate Values in Excel
by marto (Bishop) on Feb 08, 2012 at 13:59 UTC
Re: Deleting Duplicate Values in Excel
by Ratazong (Prior) on Feb 08, 2012 at 14:05 UTC
Re: Deleting Duplicate Values in Excel
by InfiniteSilence (Curate) on Feb 08, 2012 at 14:13 UTC

    • Open the spreadsheet with one of the Excel modules you can find in CPAN
    • Read the values in the range into a hash as keys $hash{'s_no/tags'}++
    • Iterate over hash keys and split them again like perl -e '%hash = (q|check1/init|=>3,q|check2/hi|=>4); for(keys %hash){print join qq|\n|,split qq|\/|,$_};'

    Celebrate Intellectual Diversity

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-12-26 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (176 votes), past polls