Answer the question
In order to leave comments, you need to log in
How to check if a sheet exists in an Excel file (Apache POI)?
In the If statement, I check if the Excel file exists in order to open it and perform a series of actions, but apart from checking the existence of the file itself, how can I immediately add a check for the existence of a sheet (sheet) in this file under a certain index or name. I give the existing code below:
File b = new File(getExternalFilesDir(null) + "/plik.xls");
if (b.exists()) {
File file = new File(getExternalFilesDir(null) + "/plik.xls");
try {
FileInputStream inputStream = new FileInputStream(file);.....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question