PL/SQL program to read data from *.xls file into oracle tables

Hi,

    I have a report data in the form of an   " *.xls "    file. The data in this file is of different languages
( eg:  english, japanese, taiwanese and chinese).

I wrote a ctrl file in PL/SQL to load the data from    *.csv  file into oracle tables and used  'sqlldr' to get my job done

But  Microsoft Excel is troubling us because
When I do save-As the *.xls  file into *.csv (comma seperated value format)
then all the character wrt japanese, taiwanese and chinese etc are lost and they are replaced with junk character like "????".

can U please suggest me

a)  As how to modify my ctrl file

OR

b) write a new PL/SQL program,

so that it can read the data directly from " *.xls "   file into oracle tables without any data corruption ?
( i.e.  It should preserve the characters of different languages when exporting data from *.xls file into oracle tables).

Thankyou,



gadenadaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

konektorCommented:
make sure u used proper character set while loading csv to oracle.

if u use external table using loader do not forget to specify characterset:
CREATE DIRECTORY <your name of directory> as '<path to csv location on database server>';
CREATE TABLE <your table name> (
  <col1>  VARCHAR2(1),
  <col2>  DATE,
  ...
)
organization external(
type oracle_loader
default directory <your name of directory>
access parameters( records delimited by newline characterset <your character set>
skip 0
badfile <your name of directory>:'<your csv filename>.bad'
logfile <your name of directory>:'<your csv filename>.log'
discardfile <your name of directory>:'<your csv filename>.discard'
fields terminated by ';'
enclosed by '"'    
(
  <col1>  CHAR(1),
  <col2>  DATE "YYYY/MM/DD",
  ...
)
) location( <your name of directory>:'<your csv filename>.csv'))
/


if u use sql loader not using external table, make sure that user of operating system has set nls_ parameteter set to proper character set.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bochgochCommented:
Just to be clear -- you won't load a Excel format file (.xls) created in Excel into Oracle via an external table (or any other method) you must convert to CSV prior to creating the external table, therefore option a) is the way to go.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.