Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in reading data from Excel Sheet

 
Abhishek Reddy
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Excel sheet has a column with data value ranging from all numeric to alphanumeric. (Mixed data type). When i read this column using jdbcdbc, the datatype that i get depends on the data present in first row of this column. If first value for this col is 999, it picks up SQL data type as 8 (decimal). if it is M999, it picks SQL data type as as 12(varchar). The trouble is, whatever is the datatype, rs.getString(..) returns null whenever other type of data is encountered. Can someone suggest whats the solution for this data problem such that i always get the data present in the excel sheet. thanks.
 
Shivaprasad P Kanaganahallimath
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup even i am facing the same problem. i have two datatypes one is string and another one is int. but still stuck with the problem.....
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JDBC to access Excel files is kind of a hack; it's no surprise that various DB concepts don't fit in well. Could you use a better-suited API like Jakarta POI of jExcelApi?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic