That’s very nice, Kaspars. Thank you for releasing the code and writing this post to explain it.

As Andrew also commented, I have also been using PHPExcel. Not entirely without issues, but it did the job.