title: How to export text from R into one cell in Excel
body: <p>I have 3205 observations in my dataset. Each observation contains several paragraphs worth of text and looks something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>BRIEF_ID</th>
  <th>STATE</th>
  <th>BRIEF</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01999110036250</td>
  <td>ALABAMA</td>
  <td>paragraphs of text here...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>My goal is to export this dataset into Excel/csv so that it looks exactly like it does in R. So far I've tried different variations of this:</p>
  <pre><code>write.table(MyData, file=&quot;MyData.csv&quot;, sep=&quot;,&quot;)
  </code></pre>
  <p>Unfortunately, when I use this syntax, it exports into Excel/csv in a very weird way, splitting the paragraphs of text into multiple columns and multiple rows. For example</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>BRIEF_ID</th>
  <th>STATE</th>
  <th>BRIEF</th>
  <th></th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01999110036250</td>
  <td>ALABAMA</td>
  <td>paragraphs</td>
  <td>text</td>
  </tr>
  <tr>
  <td>of</td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>here...</td>
  <td></td>
  <td></td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Any idea how I can keep the paragraphs of text together in one cell?</p>
  <p><em><strong><strong><strong><strong>UPDATED TEXT/NOTEPAD EXAMPLE FOR 1 OBSERVATION</strong></strong></strong></strong></em>*</p>
  <p>41,' ' 0499970019131,ARIZONA,&quot;GOOD AFTERNOON EVERYONE., THANK YOU FOR BEING HERE TODAY., AND I WANT TO UPDATE YOU ON WHERE ARIZONA
  IS IN ITS CURRENT SITUATION, WHERE OUR NUMBERS, ARE, AND THE ACTION STEPS WE INTEND TO TAKE
  GOING FORWARD., I WANT TO BEGIN BY JUST AGAIN SAYING THANK
  YOU TO ALL OF OUR NURSES, DOCTORS, EMERGENCY, MEDICAL RESPONDERS, AND HEALTHCARE WORKERS,
  T&quot;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  DAY THAT WE ARE DEFINITELY,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,</p>