Export Excel and CSV: Generates an empty file