A basic excel CSV export is not capable of saving files in UTF-8. This causes issues if you are using any high ASCII characters like º for degrees symbol or anything similar. Modify the code to save as a CSV in UTF-8 format instead of built-in excel method.