title: Specify column width and row height for excel using html table
body: <p>I'm working on a project where I need to export a html table to excel sheet using jquery. I have the required plugins and all but what I'm unable to do is set column width when excel opens the file.<br/><br/>I've tried setting <code>&lt;th style="width:70px;"&gt;</code> and also set <code>table-layout:fixed; width:100%;</code> for the relavant tables. I've also tried <code>&lt;DefaultColumnWidth&gt;1&lt;/DefaultColumnWidth&gt;</code> in WorkSheetOptions without success. <br/><br/> What I simply need is that all columns be of equal width and the row heights vary according to the cell contents. Is there any way I can achieve this? I could also work with other plugins which convert html table to excel but it needs to have options to set column widths and row heights. Any help is greatly appreciated.
  <br/><br/>Here is a sample table I'm working on:
  <br/><br/></p>
  
  <pre><code>&lt;html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"&gt;
  &lt;head&gt;
      &lt;meta name=ProgId content=Excel.Sheet&gt;
      &lt;meta name=Generator content="Microsoft Excel 11"&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;!--[if gte mso 9]&gt;&lt;xml&gt;&lt;x:ExcelWorkbook&gt;&lt;x:ExcelWorksheets&gt;&lt;x:ExcelWorksheet&gt;&lt;x:Name&gt;Hourly Summary Report&lt;/x:Name&gt;&lt;x:WorksheetOptions&gt;&lt;x:DefaultColumnWidth&gt;16&lt;/x:DefaultColumnWidth&gt;&lt;x:DisplayGridlines/&gt;&lt;/x:WorksheetOptions&gt;&lt;/x:ExcelWorksheet&gt;&lt;/x:ExcelWorksheets&gt;&lt;/x:ExcelWorkbook&gt;&lt;/xml&gt;&lt;![endif]--&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;table style="table-layout:fixed; width:100%;"&gt;&lt;thead&gt;
      &lt;tr&gt;
          &lt;th style="text-align:center; vertical-align:middle; word-wrap: break-word;"&gt;This sentence badly needs a word wrap&lt;/th&gt;
          &lt;th style="text-align:center; vertical-align:middle;"&gt;Industrial Robots&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td class="bg-black disabled color-palette" style="text-align:center; vertical-align:middle; font-weight:bold;"&gt;13 Jun 2017 12:00 AM - 13 Jun 2017 01:00 AM&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>