Solved

issue with ole2.get_char_property - urgent

Posted on 2004-10-17
3
1,332 Views
Last Modified: 2008-02-01
I'm using ole2.get_char_property function for loading data from excel to oracle.
In spreadsheet some cell has a numeric values while they still needs to be treated as character for Oracle varchar2 data type.
It seems like this function takes the first byte only for numeric value????
example:
cell values : 12345 -->  1
                  23456 --> 2

Since the same column can have character and numeric value how can I deal with this issue?
0
Comment
Question by:smena
  • 2
3 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 12338739
The only thing I've been able to locate is talking about the cells property being set to custom instead of text.  Try resetting the cells property to 'text'.
0
 

Author Comment

by:smena
ID: 12342708
slightwv.

that works... thank you. I was abke to find it on metalink as well.
Thought, I founf another problem where value does not fit the cell and it's not reading correctly.
For instance, if cell width is not bif enough, excel displays it as #### instead of 05-May-04.
Do you know how take take care of this?
1
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 350 total points
ID: 12346875
Off the top of my head, I can't even attempt to guess at why this is happening.

It's a little surprising that even though the cell width isn't big enough for display that the cell contents can't be read.  That sounds like it might be a bug of some type.

I've never played with the ole2 functions so I'm not able to provide 100% accurate advice.  I'm just thinking out loud here:  Is there a way to manipulate the worksheet using ole2?  I'm thinking that there might be a way to set the column width after you open it.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question