How to fix unreadable code in exported CSV file?