Click here to Skip to main content
15,440,323 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I am using XlSX.Read Javascript API to upload excel file, while trying to upload the excel file i need to un protect or remove the password, or any other way to un protect or input the password in Javascript, i have attached the code below for your reference, please check.


What I have tried:

   <script src="">  </script>
   <script src=""></script>
   var ExcelToJSON = function() {

   this.parseExcel = function(file) {
   var reader = new FileReader();

   reader.onload = function(e) {
   var data =;
   var workbook =, {
      type: 'binary',
      password: NULL

   workbook.SheetNames.forEach(function(sheetName) {
   // Here is your object
   var XL_row_object = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[sheetName]);
   var json_object = JSON.stringify(XL_row_object);



  reader.onerror = function(ex) {


SeanChupas 30-Apr-21 11:10am    
Can you do this server side instead of using JavaScript?
Richard Deeming 30-Apr-21 12:21pm    
Maybe you need to investigate the password: NULL parameter you're passing to the function?

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