ExcelUtils excelUtils = new ExcelUtils(url, sheet); Change the sheet to sheet 1 to avoid the problem. Actually, the sheet was not present, which is why it displays an error.