I have a system that generates a csv file (it could just as easily be a tab delimited file if easier). The the contents of the file is essentially a row of column headings, and several records beneath (the first two rows have some other data). (A typical file has say 30 columns and 6000 rows, but could be bigger or smaller). I need a script that can read in this csv file and output an excel xlsx with a *pivot table* of the data. I also require *pivot chart* of the pivot table.
Details of the pivot table:
- The summed-up field in the pivot table will be the first column, and will be titled 'Number'
- The second column is called "Observations" which mustn't be visible in the pivot table (but be included in the range)
- The third column must be the row-field
- All other fields must be in the pivot table, as page fields
There are a few other odds and ends I want in the xlsx file, but they are trivial (titles, etc).
The best spec of what I want is to go from [url removed, login to view] to [url removed, login to view], see the attachments.
The script must work on a FreeBSD system (i.e. Linux NOT Windows), and ideally should be in perl (as the rest of the system is perl). But I would also accept a script in php.