I am connecting to remote excel file using jdbc driver:
Class.forName(JDBC_DRIVER);
System.out.println("Connecting to database...");
conn = DriverManager.getConnection("jdbc:excel:smb://username:pass@host/path/Data.xlsx");
System.out.println("Connected to " + "url" + " successfully");
It works fine, but when I enter wrong username/password it connects successfully too. How should I implement it to get exception when connecting with wrong credentials?