Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling the Excel file using Java

 
Ganapathy palanisamy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends,
I am doing the program for reading the data from excel.


The above program works well to retrieve the data from excel. But i want to select date_column (see below example) particular cell value.. i.e i want to select the column heading from excel. I want to use the (ex. select empcode,name from {sheet1$] where 15.mar.10='PRESENT' but its not working..

NAME EMPCODE 12.MAR.10 15.MAR.10
------- ---------- ------------ ------------
RAM 7872997 PRESENT ABSENT
GATE 7872998 ABSENT PRESENT

guide me friends..

[edit Jan Cumps: changed all caps title to mixed case]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My impression is that the Excel-as-an-ODBC-source thing is not particularly stable or full-featured. Have you considered using a library such as Apache POI or jExcelApi for reading the file?
 
Ganapathy palanisamy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried it, but its giving some error...
i have used the apache 3.6 poi jar file , and i saved c:\program files\apache\webapps\common\lib
but the program says




SO PLEASE PROVIDE ME ACTUAL CODE FOR THAT AND IF JAR FILES IS WRONG SEND ME THE EXACT LINK TO DOWNLOAD IT AND PATH TO SAVE IT...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please KeepItDown.

c:\program files\apache\webapps\common\lib

What is that supposed to be? Do you really have a web app called "common"? All required jar files of a web app must be in the WEB-INF/lib directory of that web app, and you may need to restart the web app before the libraries can be used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic