title: want to set the border to table by exporting data to excel sheet in codeingiter
body: <p>I am having problem setting a border to a table.</p>
  
  <p>When I export the table from an Excel sheet I get the values without a border. </p>
  
  <p>I want to fix the border to the table but it shows an error.</p>
  
  <pre><code>&lt;div class="dvData"&gt;
    &lt;table&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;Customer Name&lt;/th&gt;
          &lt;th&gt;Email Id&lt;/th&gt;
          &lt;th&gt;Mobile Number&lt;/th&gt;
          &lt;th&gt;Residential Address&lt;/th&gt;
          &lt;th&gt;Temporary Address&lt;/th&gt;
          &lt;th&gt;Company name&lt;/th&gt;
          &lt;th&gt;Company type&lt;/th&gt;
          &lt;th&gt;Bank Name&lt;/th&gt;
          &lt;th&gt;Branch Name&lt;/th&gt;
  
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;?php foreach ($results as $result) { ?&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;first_name;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;email;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;phone_num;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;address1;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;address2;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;company_name;?&gt;&lt;/td&gt;
          &lt;td&gt;
            &lt;?php echo $result-&gt;customer_type;?&gt;&lt;/td&gt;
  
        &lt;/tr&gt;
  
        &lt;?php } ?&gt;
  
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this is my script code:</p>
  
  <pre><code>jQuery(document).ready(function() {
  
    $(".dvData").hide();
    EditableTable.init();
  
    $("#btnExport").click(function (e) {
      window.open('data:application/vnd.ms-excel,' + $('.dvData').html());
      e.preventDefault();
    });
  });
  </code></pre>
  
  <p>this is php code:</p>
  
  <pre><code>&lt;input type="button" class="btn btn-info pull-right" id="btnExport" value=" Export" /&gt;
  </code></pre>
  
  <p>without setting border am getting output like this .. refer noborder.png table contain data with no border.</p>
  
  <p><img src="https://i.stack.imgur.com/vKSJu.png" alt=""></p>
  
  <p>When I'm setting  border value to table am getting output like this.. border.png</p>
  
  <p><img src="https://i.stack.imgur.com/A58P3.png" alt="enter image description here">]<a href="https://i.stack.imgur.com/A58P3.png" rel="nofollow noreferrer">2</a></p>
  
  <pre><code>&lt;table border="1" width="1000px" cellspacing="0" cellpadding="0"&gt;
  </code></pre>