I have a table like this in an Excel worksheet:

Mary Bremen
Paul Berlin
Anita Hamburg
Klaus Berlin
Peter Berlin
Conny Bremen

and I want the number of the city names counted and output in HTML:

Berlin 3
Bremen 2
Hamburg 1

preferably sorted as for the cities with the highest numbers. How do I do this?

  • Do U want summarizing data in Excel Sheet or as WEB page Table? – Rajesh S Dec 12 '19 at 8:21
  • For a web-page table in HTML. – Stefan Müller Dec 12 '19 at 8:53
  • I can show you entire method in Excel then you can save the file as HTML ,, will this work for you? Please confirm through comments. – Rajesh S Dec 12 '19 at 9:00
  • This would be interesting, but the task will have to be done again and again, so a script will be better. – Stefan Müller Dec 12 '19 at 9:24
  • then sorry since I don't know HTML coding !! – Rajesh S Dec 12 '19 at 9:28

This page explains how to read in a CSV file with Perl and print the content sorted according to the values of some column. The CSV-Module is the important part, I was lacking.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.