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
I have some troubles using viewerJS with ODS documents. The document look kinda broken. Even if I understand as a developper what is going on, my users won't like that.
the original version of the ODS:
I find a way to show the data, with SheetJS, but I think it is sad that a library that is not supposed to work with ODS documents work better than a library that is supposed to work with those documents
rendered html with SheetJS:
used code with SheetJS: var request = new XMLHttpRequest(); request.open('GET', uri, true); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); request.responseType = 'blob'; request.onload = function(e) { if (this.status === 200) { var blob = this.response; blob.arrayBuffer().then(res=>{ var workbook = XLSX.read(res, { type: "array" }); var worksheet = workbook.Sheets[workbook.SheetNames[0]]; $('.showView div').html(XLSX.utils.sheet_to_html(worksheet)); }); } }; request.send();
The text was updated successfully, but these errors were encountered:
I have some troubles using viewerJS with ODS documents. The document look kinda broken. Even if I understand as a developper what is going on, my users won't like that.
the original version of the ODS:
I find a way to show the data, with SheetJS, but I think it is sad that a library that is not supposed to work with ODS documents work better than a library that is supposed to work with those documents
rendered html with SheetJS:
used code with SheetJS:
var request = new XMLHttpRequest(); request.open('GET', uri, true); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); request.responseType = 'blob'; request.onload = function(e) { if (this.status === 200) { var blob = this.response; blob.arrayBuffer().then(res=>{ var workbook = XLSX.read(res, { type: "array" }); var worksheet = workbook.Sheets[workbook.SheetNames[0]]; $('.showView div').html(XLSX.utils.sheet_to_html(worksheet)); }); } }; request.send();
The text was updated successfully, but these errors were encountered: