Click here to Skip to main content
15,905,874 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I loaded [^] into 2 projects and use it to load Excel file. The code is
var workbook = XLSX.read(data, {  type: 'binary' });

In one project, I works fine, through debugging
<pre>XLSX.read
function Wg(e,r){l();if(typeof ArrayBuffer!=="undefined"&&e instanceof ArrayBuffer)return Wg(new Uint8Array(e),r);var t=e,a=[0,0,0,0],n=false;var i=r||{};if(i.cellStyles){i.cellNF=true;i.sheetStubs=true}lu={};if(i.dateNF)lu.dateNF=i.dateNF;if(!i.type)i.typ
    __proto__: 
function() {
    [native code]
}
    arguments: null
    caller: null
    length: 2
    prototype: {...}



But In another project, I goes failure, through debugging
XLSX.read
function readSync(data, opts) {
	reset_cp();
	if(typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), opts);
	var d = data, n = [0,0,0,0], str = false;
	var o = opts||{};
	if(o.cellStyles) { o.cellNF = tr
    __proto__: 
function() {
    [native code]
}


Those show that the XLSX.read function are called different in the 2 projects. How can the method be correctly called? Thanks.

What I have tried:

Tried in multiple ways but unsuccessful.
Posted
Updated 15-Feb-21 22:50pm
Comments
s yu 16-Feb-21 11:30am    
It debugged the code. The error message shows that "Unhandled Exception at Line 11, Column 379 in https://js.arcgis.com/4.14 It means the jQuery library I used is not compatible with ESRI's 4.x version library.

1 solution

Both calls are the same. It's just that the first one is using "minified" code, which has changed the name of internal functions and variables to make the code smaller.

You'll need to debug the actual error - which you haven't described at all - to resolve the problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900