Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Reading Excel sheet with mixed data types

843854Sep 2 2003 — edited Sep 5 2003
This subject has probably been discussed before, but I can't find the answer by searching.
I have to read Microsoft Excel spread sheets with columns that contain mixed data. These columns contain "Item Numbers"; the trouble is that some of these "Numbers" are true integers, while some others are character strings. I'm able to establish a connection and obtain the result set. Then I try reading the data with statements such as:

rs.getString[1];
or
rs.getObject[1];

When the value in the corresponding cell matches the datatype expected by the getXXX method, the statements above return the correct values. Otherwise they return null.
How can I read the values in these cells if I don't know what type of data they contain and I have only one chance to read them?

I hope you can help.

Thanks,

Miguel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2003
Added on Sep 2 2003
5 comments
190 views