in reply to Carriage returns in Excel files

As the main issue seems to be within your scripts code, you can help us help you better by showing us the relevant parts of your code.