Working barebones XLSX export, with lots of temporary arrays (to store order) - refactoring will be a must down the road.
updated some formatting for xlsx export