• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in reading data from Excel Sheet

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.....
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic