Excel wordwrapping - split into rows with 40 characters 

Excel wordwrapping - split into rows with 40 characters without splitting a word.
split each row to 40 characters for excel by adding after each 40's character a $ to be able to split columns in excel 
the output is shown and needs to be copied into a text file
afterwards it needs to be imported in excel