Neatly Printing A CSV File
October 4, 2019
Today’s exercise can be either simple or complex, depending on how you define it.
The task is to write a program to neatly print a CSV file. Define “neatly” however you wish. The CSV format has inherently variable-width columns, but you should print the columns neatly aligned. Pages should have headers and footers. Add other features as you wish.
Your task is to write a program to neatly print a CSV file. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.
To print a CSV file, fire up LibreOffice or Excel and tell it to print. Very simple.
If you wanted a file instead, tell your program to print or export to a PDF file.
[…] the CSV file must be printed as well as loaded into Excel, and I wrote a program to do that in a previous exercise. I recently had a request to produce the output in HTML format, so I wrote that program […]
I liked this one.
In Racket: https://github.com/xojoc/programming-challenges/blob/master/programming-praxis/2019_10_04.rkt