1

Read I want when upload file excel (excel is protect with password) unprotect or remove the password with XLSX.read but don't unprotect or remove the password from excel file.

This my code:

<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.0/jszip.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.8.0/xlsx.js"></script>
<script>
var reader = new FileReader();
reader.onload = function (e) {  
    var data = e.target.result;  
    /*Converts the excel data in to object*/  
    debugger;
    if (xlsxflag) {  
        var workbook = XLSX.read(data, { type: 'binary' ,  password: '123456' });  
    }  
    else {  
        var workbook = XLS.read(data, { type: 'binary' ,  password: '123456'  });  
    }  
    
    /*Gets all the sheetnames of excel in to a variable*/  
    //var obj = workbook.Open(Location, 0, false, 1, "password");

    var sheet_name_list = workbook.SheetNames;  
}
</script>
Ouroborus
  • 16,237
  • 4
  • 39
  • 62
amirnowrozian
  • 305
  • 1
  • 2
  • 10

0 Answers0