XML Logo

We were asked to revamp some of the existing (bespoke) reports at one of our customers, and like many other sites, they had been using CSV output to generate (pseudo) Excel reports.

Advantages of CSV

CSV file output has been a reporting standard for anything that customers want to go into Excel. Simply produce a CSV file, make it available to Windows, and double clicking it will open it in your default application.

Disadvantages of CSV

It works and is simple, but simple comma delimited output doesnt give you the full power of Excel, firstly you cant format anything, you cant add headers, you can only have single worksheet based output. So when your users open the file they need to do some work to get the output looking the way they want it to. Multi worksheet based spreadsheets have to be produced as seperate CSV files and then merged into Excel - not ideal.

XML instead

The solution is to ditch the CSV output and instead produce XML files that are in the appropriate format for Excel and which offer all the formatting functionality that you can use within the spreadsheet package. So you can produce multi worksheet formatted output just as your users want, and all they have to do is open the file.

This was achieved via a simple shell script and some minor tweaks to their existing reports to convert the CSV output into the appropriate XML format.

Find out more

If this is something that you're interested in just get in touch, we have the tools already written and ready to go.

Tags: