dcsimg
Reading Excel file from JSP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   bala_chandhran
Posted On:   Tuesday, October 23, 2001 04:36 AM

Can I retreive data from an excel(.xls) file in my Jsp program?

On uploading of an excel file, it has to be parsedand data has to be inserted into the database.

Can somebody help me on this??


Thanks

Bala.c

Re: Reading Excel file from JSP

Posted By:   palani_kumar  
Posted On:   Wednesday, October 24, 2001 12:13 AM

Hai you can read an excel file by creating a odbc datasource and then treat the excel sheet as an table and take the values(this can be done using ODBC Datasource in Windows by selecting Windows Excel Driver)


create a tab by name "XYZ" ie an excel sheet with the sheet named as XYZ

if you have three columns namely
Name,Id,Country in the excel sheet. and you want to get the name you can do so like this


query="Select Name from [XYZ$]" \ the $ sign is required for ODBC properties


Executing this returns the resultset you require and you can manipulate it



Hope this helps


Cheers

Palanikumar


About | Sitemap | Contact