XLS generator code moved into separate class