Formatting text to write to a spreadsheet

I am creating a simple program which writes a string to a spreadsheet when it is copied to the system clipboard. Everything works great, except that if the text copied has multiple paragraphs and therefore has returns in it, when written to the file, they get interpretted as going to the next row of the spreadsheet. The, instead of writing all the text to one cell, the paragraphs get split up into multiple cells on multiple rows. How does one format the string so that paragraphs are still sepearated by a space, but it will write all of the text in one cell?

edit: Here’s my code if it matters


stop()
Clipboard.generalClipboard.clear()
var file:File=File.desktopDirectory.resolvePath("communication of uncertainty data.ods");
var stream:FileStream = new FileStream();
stream.open(file, FileMode.APPEND);
var timer:Timer=new Timer(250)
timer.start()
timer.addEventListener(TimerEvent.TIMER, writeToFile)
var dataString:Object=""
var column:int=0
function writeToFile(event:TimerEvent):void{
if(Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT)!=dataString&&Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT)!=null){
  dataString=Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT)
  trace(dataString)
  column++
  trace(column)
  if(dataString!=null){
  stream.writeMultiByte(dataString+"	", "iso-8859-1")
  }
  if(column==3){
   stream.writeMultiByte("\r", "iso-8859-1")
   column=0
  }
 }
 
}
saveAndExit.addEventListener(MouseEvent.CLICK, closeFile)
function closeFile(event:MouseEvent):void{
 stream.close();
 NativeApplication.nativeApplication.exit()
}