This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi I am trying to read an excel sheet for the purpose of writing it into database.By the below code ,I am getting the contents of the cell in first row,first column..Can you please help me to iterate it for the number of rows and columns.Little bit urgent...
Okay...Now I am getting the values of all the rows and columns..How can I store the value of each columns(as a field) for the purpose of storing in the database..
Thanks for the reply..
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
What difficulty are you facing in storing those values in the DB? Are you familiar with the JDBC API?
Ya..I do have a knowledge in JDBC Api...But the thing is,I dont know how to store the values which I get from the excelsheet cells to some variables,so that only I can use them in my queries..
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
Doesn't "String stringa1 = a1.getContents()" do that? I'm not familiar with jExcelAPI, buit if that's not the right method then the Cell class should have other methods that do return the correct data from the cell.
Ya...this is working...I have already tried...But it will retrieve the contents of a particular cell only...But I want to read all the cell(records) to a number of rows...
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
Sounds like a loop (or maybe two nested loops) would be involved.