I want to Import data placed in MS Excel and print it using Java Application Program. I am newbie in Java. So Please guide, is it possible.
If yes, how? Any website/tutorial will be of great help..
Thanks in advance..
You can use the POI library for reading from excel files
You can use the jexcel APIs. They're quite simple overall. http://jexcelapi.sourceforge.net/
I also think that Apache POI is working on this area as well.
Here is an article on using JDBC using Excel as a data source
This JSP page connects the Excel sheet to the database .
.<%@ page import="java.sql.*" %><br/>
.<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); %>
<BODY>
.<%
Connection con=DriverManager.getConnection("jdbc:odbc:DsnName");<br/>
Statement stm=con.createStatement();<br/>
ResultSet rs=stm.executeQuery("select * from [Sheet1$]");
%>
.<% if(!rs.next()) {
out.println("Sorry, could not find data");
}
else { %>
.<%=rs.getString(1)%>
.<%}%>
</BODY>