JSFiddle - React, Tailwind, and code Playground

HTML

<h1>tffffableToExcel Deddddmo</h1>

<p>Exporting the W3C Example Table</p>
<input type="button" id="test"  value="Export to Excel">
<table id="testTable" summary="Coddde page support in different versions of MS Windows." rules="groups" frame="hsides" border="2">
    <caption>CODE-PAGE SUPPORT IN MICROSOFT WINDOWS</caption>
    <colgroup align="center"></colgroup>
    <colgroup align="left"></colgroup>
    <colgroup span="2" align="center"></colgroup>
    <colgroup span="3" align="center"></colgroup>
    <thead valign="top">
        <tr>
            <th>Code-Page
                <br>ID</th>
            <th>Name ö,ü,ö</th>
            <th>ACP</th>
            <th>OEMCP</th>
            <th>Windows
                <br>NT 3.1</th>
            <th>Windows
                <br>NT 3.51</th>
            <th>Windows
                <br>95</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1200</td>
            <td style="background-color: #00f; color: #fff">Unicode (BMP of ISO/IEC-10646)</td>
            <td></td>
            <td></td>
            <td>X</td>
            <td>X</td>
            <td>*</td>
        </tr>
        <tr>
            <td>1250</td>
            <td style="font-weight: bold">Windows 3.1 Eastern European</td>
            <td>X</td>
            <td></td>
            <td>X</td>
            <td>X</td>
            <td>X</td>
        </tr>
        <tr>
            <td>1251</td>
            <td>Windows 3.1 Cyrillic</td>
            <td>X</td>
            <td></td>
            <td>X</td>
            <td>X</td>
            <td>X</td>
        </tr>
        <tr>
            <td>1252</td>
            <td>Windows 3.1 US (ANSI)</td>
            <td>X</td>
            <td></td>
            <td>X</td>
            <td>X</td>
            <td>X</td>
        </tr>
        <tr>
            <td>1253</td>
            <td>Windows 3.1 Greek</td>
            <td>X</td>
            <td></td>
            <td>X</td>
            <td>X</td>
           ...

JavaScript

var b64c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

/**
 * btoa(data): String
 *
 * Base64 encode a binary string (all char codes must be < 255).
 *
 * @param  {String} data The data to convert
 * @return {String} The base64 binary
 */
function btoa(data) {
  /*jslint bitwise: true */
  var i, res = "", length = data.length;
  for (i = 0; i < length - 2; i += 3) {
    res += b64c[data.charCodeAt(i) >>> 2];
    res += b64c[((data.charCodeAt(i) & 3) << 4) |
                (data.charCodeAt(i + 1) >>> 4)];
    res += b64c[((data.charCodeAt(i + 1) & 15) << 2) |
                (data.charCodeAt(i + 2) >>> 6)];
    res += b64c[data.charCodeAt(i + 2) & 63];
  }
  if (length % 3 === 2) {
    res += b64c[data.charCodeAt(i) >>> 2];
    res += b64c[((data.charCodeAt(i) & 3) << 4) |
                (data.charCodeAt(i + 1) >>> 4)];
    res += b64c[((data.charCodeAt(i + 1) & 15) << 2)];
    res += "=";
  } else if (length % 3 === 1) {
    res += b64c[data.charCodeAt(i) >>> 2];
    res += b64c[((data.charCodeAt(i) & 3) << 4)];
    res += "==";
  }

  return res;
}


/**
 * atob(data): Array
 *
 * Converts a base64 string into a binary string.
 *
 * @param  {String} data The data to convert
 * @return {String} The clear binary
 */
function atob(data) {
  /*jslint bitwise: true */
  var i, res = "", buf = [], length = data.length;
  for (i = 0; i < length - 3; i += 4) {
    buf[0] = b64c.indexOf(data[i]);
    buf[1] = b64c.indexOf(data[i + 1]);
    buf[2] = b64c.indexOf(data[i + 2]);
    buf[3] = b64c.indexOf(data[i + 3]);

    res += String.fromCharCode((buf[0] << 2) | (buf[1] >>> 4));
    if (data[i + 2] !== "=") {
      res += String.fromCharCode(((buf[1] << 4) & 0xF0) |
                                 ((buf[2] >>> 2) & 0x0F));
    }
    if (data[i + 3] !== "=") {
      res += String.fromCharCode(((buf[2] << 6) & 0xC0) | buf[3]);
    }
  }

  return res;
}

//////////////////////////////////////////////////

/**
 * btoa(data): String
 *
 *...