0

I want to access the excel file stored on the remote server through java application. I want to use jdbc for that. The apache poi is working but i want to do it using the jdbc for the desktop application.

1
  • Kindly refer this. Commented Jan 8, 2016 at 8:46

1 Answer 1

1

The easiest way of achieving it would be to use Fillo.

Fillo is an Excel API for Java and you can query xls & xlsx files. Now, it supports SELECT, UPDATE & INSERT queries with or without WHERE clause.

The sample code will look something like this.

Fillo fillo=new Fillo();
Connection connection=fillo.getConnection("C:\\Test.xlsx");
String strQuery="Select * from Sheet1 where ID=100 and name='John'";
Recordset recordset=connection.executeQuery(strQuery);

while(recordset.next()){
    System.out.println(recordset.getField("Details"));
}

recordset.close();
connection.close();
Sign up to request clarification or add additional context in comments.

1 Comment

@Harshal: you can mount the folder, on the network and share the excel file to make it accessible to the server.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.