JavaScript jquery export table to excel changes the value in exponential form jquery export table to csv,jquery export table to excel,

I Have a jquery export table to excel code. But the problem is that it changes the value is export file of xls. my table td has a value 810101E001 when I export it it changes the value like 8.10E+06.

please provide me solution what to do now.

http://jsfiddle.net/wVejP/773/

jquery code is

var tableToExcel = (function() {
  var uri = 'data:application/vnd.ms-excel;base64,'
    , template = '<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"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
    , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
    , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
  return function(table, name) {
    if (!table.nodeType) table = document.getElementById(table)
    var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
    window.location.href = uri + base64(format(template, ctx))
  }
})()
Answer:1

this is a pure academic question. is it better practice to add new elements to the dom this way with create new element <div id="div1"> <p id="p1">This is a paragraph.</p> <p id="...

this is a pure academic question. is it better practice to add new elements to the dom this way with create new element <div id="div1"> <p id="p1">This is a paragraph.</p> <p id="...

  1. create element append javascript
  2. create element append child
  3. create element append to body
  4. create element append
  5. create element and append jquery
  6. javascript create element append to body
  7. jquery create element append to body
  8. js create element append
  9. document createelement append
  10. js create element appendchild
  11. create element and append to dom
  12. javascript create element and append to div
  13. jquery create element and append child
  14. jquery create element and append to div
  15. js create element and append to body
  16. angular create element and append
  17. jquery create element then append
  18. js create element and append to div
  19. create new element and append jquery
  20. create html element and append jquery

A basic function: function myStuff(a,b,c){ var _c = _c || c || {}; console.log(_c); } The idea is to use a cached value if used before, or a new value if new/different. The question is: if ...

A basic function: function myStuff(a,b,c){ var _c = _c || c || {}; console.log(_c); } The idea is to use a cached value if used before, or a new value if new/different. The question is: if ...

  1. javascript cache function result
  2. javascript cache function
  3. clear cache function javascript
  4. javascript function clear browser cache

Can phantomjs perform actions like getText() or enterText() inside iFrame? I am using protractor to do my testing. Phantomjs can perform actions in the default frame but inside iframe the locators get ...

Can phantomjs perform actions like getText() or enterText() inside iFrame? I am using protractor to do my testing. Phantomjs can perform actions in the default frame but inside iframe the locators get ...

  1. accessing elements inside iframe

I have this JQuery script that is looking at some DIVs and getting the image sizes and setting the div size according to the images. I had a JQuery script to get all the DIVs and loop to each image ...

I have this JQuery script that is looking at some DIVs and getting the image sizes and setting the div size according to the images. I had a JQuery script to get all the DIVs and loop to each image ...

  1. optimize javascript jquery