Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

443
Views
End of Data Reached Exceljs readFile()

Im trying to read excel files but it returns this code

Error: End of data reached (data length = 0, asked index = 4). Corrupted zip ?

This is the code that I used. I am trying to read excel files from a list of string filenames. But each loop returns the said error above

const ExcelJS = require('exceljs');

function attentionAverage(filenames) {
  console.log(filenames);//list of all excel filenames
  for (const filename of filenames) {
      console.log('Testing Attention_average ' + filename)
      var workbook = new ExcelJS.Workbook();
      let myPromise =  workbook.xlsx.readFile(filename);

      // "Consuming Code"
      myPromise.then(function() {
        // If success
        // Read file
        console.log("Success");
      }, function(err) {
        // If fail
        console.log('Testing Attention_average ' + filename)
        console.log(err);
      });
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!