function results(calc) {
  var body = document.body;
  if (calc == 'libre') { // LibreOffice Calc
    body.innerHTML = body.innerHTML.replace(/\x1d\r?\n?\s?/g, '<br>');  // Cell split
    body.innerHTML = body.innerHTML.replace(/>([^<]+)?\x1f\r?\n?\s?([^<]+)?</g, '>="$1"&char(10)&"$2"<'); // Line breaks in cells
    body.innerHTML = body.innerHTML.replace(/\x1f\r?\n?\s?/g, '"&char(10)&"');
  } else if (calc == 'just') { // JUST Calc
    body.innerHTML = body.innerHTML.replace(/\x1f\r?\n?\s?/g, '<br>'); // Line breaks in cells
    body.innerHTML = body.innerHTML.replace(/>([^<]+)?\x1d\r?\n?\s?([^<]+)?</g, '><p>$1</p><p>$2</p><'); // Cell split
    body.innerHTML = body.innerHTML.replace(/\x1d\r?\n?\s?/g, '</p><p>');
  } else { // Excel or WPS Spreadsheets
    body.innerHTML = body.innerHTML.replace(/\x1d\r?\n?\s?/g, '<br>'); // Cell split
    body.innerHTML = body.innerHTML.replace(/\x1f\r?\n?\s?/g, '<br style="mso-data-placement: same-cell;">'); // Line breaks in cells
  }
}
