You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In English locales it is common to separate thousands by using a comma ie 1000 -> 1,000, also for readability zeros are replaced with a '-' (see jquery datatables)
If you were to feed either of these numbers into the parser a NaN error would result with warning for end user.
Consider either a global or cell specific (when data type is numeric) processor.
A quick and dirty deals with the global (not ideal as there may be legitimate string uses for ','
functionmakeXLSXExport(tableId){lettable=document.querySelector("#"+tableId);lettableT=table.cloneNode(true);;tableT.innerHTML=tableT.innerHTML.replace(/,/g,'');//replaces , globallytableT.innerHTML=tableT.innerHTML.replace(/>-</g,'><');//replaces cells only containing - globallyTableToExcel.convert(tableT);}
In English locales it is common to separate thousands by using a comma ie 1000 -> 1,000, also for readability zeros are replaced with a '-' (see jquery datatables)
If you were to feed either of these numbers into the parser a NaN error would result with warning for end user.
Consider either a global or cell specific (when data type is numeric) processor.
A quick and dirty deals with the global (not ideal as there may be legitimate string uses for ','