DataDrivenFramework/src/main/java/com/datadriven/framework/utils/ReadExcelDataFile.java
public boolean removeSheet(String sheetName) {
		int index = workbook.getSheetIndex(sheetName);
		if (index == -1)
			return false;

		FileOutputStream fileOut;
		try {
			workbook.removeSheetAt(index);
			fileOut = new FileOutputStream(path);
			workbook.write(fileOut);
			fileOut.close();
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
/****************** Returns true if sheet is removed successfully else false if sheet doesn't exist ***********************/
Returns true if sheet is removed successfully else false if sheet doesn't exist
Returns true if sheet is removed successfully else false if sheet doesn ' t exist
public boolean removeSheet(String sheetName) {
		int index = workbook.getSheetIndex(sheetName);
		if (index == -1)
			return false;
		FileOutputStream fileOut;
		try {
			workbook.removeSheetAt(index);
			fileOut = new FileOutputStream(path);
			workbook.write(fileOut);
			fileOut.close();
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
public boolean removeSheet ( String sheetName ) { int index = workbook . getSheetIndex ( sheetName ) ; if ( index == - 1 ) return false ; FileOutputStream fileOut ; try { workbook . removeSheetAt ( index ) ; fileOut = new FileOutputStream ( path ) ; workbook . write ( fileOut ) ; fileOut . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; return false ; } return true ; }
Returns true if sheet is removed successfully else false if sheet doesn't exist
Returns true if sheet is removed successfully else false if sheet doesn ' t exist