I download CSV files (e.g. my bank account transactions) and would like to build reports (to print) from the data.

I have searched and found several report writer libraries, but all would force me to write my own reporting applications using them.

I know I can import CSV into a spreadsheet, but that also involves a lot of work changing cell sizes and formats - and still makes me program a report.

I could probably import the file into a database such as LibreOffice Base, but I'd still have to design a database and write my own report program for each layout of CSV file. I currently don't know how to write Base programs.

As a first step, I wrote a bash script which uses awk to make a rudimentary report, but it doesn't work very well because I didn't add code to implement any control breaks, subtotals, and it has some difficulties with the transaction data being too long to fit on one line using a readable font.

I could fix all those things, but I'd have to start from scratch the next time I get CSV data in a different layout from somewhere else.

In a prior incarnation, I was a business programmer and a great deal of what I did was writing report programs. They were not fun to work with!

There must be standalone report writer software out there for Linux, but I have yet to find it.

I don't need anything very fancy, just page formatting tools and a few control breaks.

A few accumulators would be nice so I can summarize transactions by categories, etc., but that's not a requirement.


I doubt there is an auto-magical tool out there that receives a csv file as its input and then creates a report as an output -without- further interaction from the user... at least, you will be prompted to define the output layout, probably through the edition of some formatting/rules files. That being said, I think you may want to use something to go from a csv file to a simple spreadsheet, so my first pick would be csv2odf.

csv2odf Project

csv2odf is a command line tool that can convert comma seperated value (csv) files into odf documents. It can produce reports using templates in the following file formats: ods, odt, xlsx, docx, xlsm, docm, html.

csv2odf is useful for creating reports from databases and other data sources that produce csv files. csv2odf can be combined with cron and shell scripts to automatically generate business reports.

The csv data is merged with a template file to produce the output file. The template is a standard open document file as produced by OpenOffice.org or ooxml formats as produced by Microsoft Office.

~ http://sourceforge.net/p/csv2odf/wiki/Main_Page/

I hope that helps - good luck with your report!

  • I'm expecting to have to define layout and other parameters. I love automagical things, but this isn't a case where one would work. My concern is that I don't want to have to learn javascript, etc. just to get a report. Maybe if I knew more about calc than just how to sum a column ;), I could build a template that would actually do me some good. I do use spreadsheets, but mine are very primitive. I will take a look at the tool though. If you know of any tutorials on building templates to import simple data into, that would be useful.
    – Joe
    Nov 27 '14 at 3:46
  • BTW, calc will import CSV directly (data sources), but I don't know how to take advantage of that to fill in a useful template and generate a report without doing it manually from scratch each time.
    – Joe
    Nov 27 '14 at 3:51
  • I just took a look at csv2odf. Apparently it does a lot more than just converting the csv into a document. I'll have to study it more when I'm more awake.
    – Joe
    Nov 27 '14 at 11:27
  • I used it some time ago, and I have searched for some examples from what I did but sadly I couldn't find them. I remember having done counts and sums, and I think it was not that hard. I will post again if I can find something useful.
    – jimm-cl
    Nov 27 '14 at 12:49

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.