Want to open an Excel file and load it into Oracle - Oracle COM Automation

I'm doing some test and I got the following errors in the dbms output:
Creating Excel application...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Workbooks...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Add to WorkBooks...
COM-0002: Invalid Token or no interface for token
I tried to register the orawpcom10.dll on the server but I could not.
I changed the orawpcom10.dll file for a newer one, but I got the same error.
I tried to google the error messages, but I did not find any solution.
Could you give me any idea?
Thanks again,
Javier
Edited by: 882807 on 01-sep-2011 6:01

Sorry, I was a little bit busy at work. You can see my answers below:
1. Post your database version from v$version.
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL>2. The path where orawpcomxx.dll stored (preferably with dir command from command prompt).
C:\oracle\product\10.2.0\db_1\BIN>dir orawpco*.dll
El volumen de la unidad C no tiene etiqueta.
El número de serie del volumen es: E0C2-001B
Directorio de C:\oracle\product\10.2.0\db_1\BIN
22/06/2010  17:40            81.920 orawpcom10.dll
               1 archivos         81.920 bytes
               0 dirs  31.090.524.160 bytes libres
C:\oracle\product\10.2.0\db_1\BIN>3. Definition (CREATE statement) of UTILS_LIB
create library utils_lib as 'C:\oracle\product\10.2.0\db_1\BIN\orawpcom10.dll';4. Relevant portion of TNSNAMES.ora and LISTNER.ora.
TNSNAMES.ORA
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
  )LISTENER.ORA
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = vsdwh1.AD.SMS.CARM.ES)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
...5. Status (valid/invalid) of ORDExcelSB from all/dba/user_objects.
SQL> select object_name,object_type,status from all_objects where object_name =
'ORDEXCELSB';
OBJECT_NAME                    OBJECT_TYPE         STATUS
ORDEXCELSB                     PACKAGE             VALID
ORDEXCELSB                     PACKAGE BODY        VALID
SQL>6. How you are calling and the actual error (copy paste from SQL prompt).
SQL> SET SERVEROUT ON
SQL> DECLARE
  2  v_Name          varchar2(90);
  3  v_SlNo          varchar2(100);
  4  v_Job           varchar2(200);
  5  v_Dept          varchar2(100);
  6  v_recon_remark  varchar2(50);
  7  v_sal_amt_usd   number;
  8  v_Bonus_amt_usd number;
  9  result INTEGER;
10
11  i        binary_integer;
12  filename varchar2(255);
13  BEGIN
14
15  filename := 'C:\Example.xls';
16
17  result := ORDExcelSB.CreateExcelApplication('');
18  result := ORDExcelSB.OpenExcelFile(filename, 'Sheet1');
19
20  /* Excluding the header row and reading the first 5 row */
21  FOR n in 2 .. 5 LOOP
22
23  v_Name          := ORDExcelSB.GetDataStr('A' || n);
24  v_SlNo          := ORDExcelSB.GetDataReal('B' || n);
25  v_Job           := ORDExcelSB.GetDataStr('C' || n);
26  v_Dept          := ORDExcelSB.GetDataStr('D' || n);
27  v_sal_amt_usd   := ORDExcelSB.GetDataNum('E' || n);
28  v_Bonus_amt_usd := ORDExcelSB.GetDataNum('F' || n);
29
30  dbms_output.put_line(v_Name || '  ' || v_SlNo || '  ' || v_Job || '  ' ||
31  v_Dept || '  ' || v_sal_amt_usd || '  ' ||
32  v_Bonus_amt_usd);
33
34  END LOOP;
35
36  result := ORDExcelSB.ExitExcel();
37  EXCEPTION
38  WHEN OTHERS THEN
39  result := ORDExcelSB.ExitExcel();
40  RAISE;
41  END;
42  /
Creating Excel application...
COM-0004: The registered CLSID for the ProgID is invalid.
Invoking Workbooks...
COM-0004: The registered CLSID for the ProgID is invalid.
Opening Excel file C:\Example.xls ...
COM-0002: Invalid Token or no interface for token
Opening WorkBook
COM-0002: Invalid Token or no interface for token
Invoking WorkSheets..
COM-0002: Invalid Token or no interface for token
Invoking WorkSheet
COM-0002: Invalid Token or no interface for token
Opened
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0      0  0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0      0  0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0      0  0
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
0      0  0
Closing workbook and quitting...
Closing workbook...
COM-0002: Invalid Token or no interface for token
Closing workbooks...
COM-0002: Invalid Token or no interface for token
COM-0002: Invalid Token or no interface for token
PL/SQL procedure successfully completed.
SQL>Thanks again for your interest.
Javier

Similar Messages

  • 1.is it possible to read a .xls file and load it into an oracle table

    1.is it possible to read a .xls file and load it into an oracle table, using oracle database or oracle forms i.e. either utl_file, or text_io, or any other oracle tool.
    As far as I know we need a csv file or a txt ( tab delimited) file ?
    2.Are there any windows tools for the same

    Hi,
    If you want to use the DDE package to read the XLS file then yes, you will neeed to know the number of rows and columns in the input file.
    i.e. How will you know :
    1) How many columns are there in the input file.
    If I have a XLS file with the following data :
    R1C1 R1C2 R1C3 R1C4 R1C5 R1C6 R1C7
    xxx xx x
    Where R represents row and C represents column, then how will you know the each row has 7 columns. If you know the answer upfront, then it's not a issue.
    Using the DDE apprach, you will have to specify the RowNum and the ColumnNo of each idividual cells to read/write data from xls sheet.
    Look at the syntax in my ealier post.
    using the other approch (i.e. comma delimited text file - CSV file) , you need not know the number of columns as you can loop thru the input record till the last column is read.
    All you have to do is to look for the 'n' occurances of the field delimiter say ',', do a substr from the current position to the point where the ',' was found.
    This process is to be repeated in a loop till all columns are read.
    The TEXT_IO package can trap for EOF (End Of File).
    Hope I made myself clear.
    -- Shailender Mehta --

  • How to open an Excel file and write data into it.

    Hi All,
    I have an excel template, which has graphs and some tables containing corresponding data. If i change the data in tables it changes the graphs. So, if i have a template in the server, is it possible for me to open this excel file and change the data in the tables to chanage the graphs. How can i go to different worksheets and go to different cells and change the values and save the file.
    Thanx in advance
    Cheers
    Pej

    You can setup an ODBC connection to the Excel file and update the file with JDBC, using the JDBC-ODBC bridge.
    Hope this helps

  • I want to open a PDF file and i can't? any advice?

    I want to open a PDF file and i can't? any advice?

    Pages will not open a PDF file
    It will export a file as PDF
    See
    Pages: Supported file formats - Apple Support

  • Loop Through Excel Files and Load into SQL Server Table

    I'm following the example here.
    https://www.youtube.com/watch?v=_B83CPqX-N4
    I'm pretty sure I did all the steps, but for some reason my project is not running.  I'm thinking there is a 32-bit or 64-bit issue lurking in here somewhere.
    Here's my error message.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" starting.
    Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
    Error: 0xC0209303 at Package, Connection manager "Excel Connection Manager": The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.
    An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".
    Error: 0xC001002B at Package, Connection manager "Excel Connection Manager": The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    For more information, see http://go.microsoft.com/fwlink/?LinkId=219816
    Error: 0xC020801C at Data Flow Task, Excel Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. 
    There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: Excel Source failed validation and returned error code 0xC020801C.
    Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
    Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" finished: Failure.
    The program '[5392] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
    I have 32-bit Excel and 64-bit SQL Server.  Is that the issue?  Can someone tell me what's wrong here?
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Sa-weeettttttt!!  Thanks.  I figured that's what it was.  For the benefit of others, this link shows you exactly how to make the modification recommended above.
    http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Read Excel file and insert it into a table

    Hi All
    i'm developing a web app using jdeveloper 11.1.1.3
    I want to upload an excel file to a table, is there way in the frame work to do this easily
    Tx

    convert the excel fil to a .csv file and expose the csv file as a datacontrol and then use it in the table
    http://technology.amis.nl/blog/2306/uploading-csv-files-into-dynamic-adf-faces-tables-programmtically-creating-columns

  • I want to open an excel file from a folder in the Microsoft live office on Hotmail. Their instruction is to go to tools in Firefox, go to plug-ins and then install Microsofts Office 2010. Can't find plug-h. Help?

    I have uploaded an excel file from my desk top to the Windows Live (HOTMAIL?) office suite. When I try to open the file I get an error that says my system is not supported. My system passes all of the listed criteria except for one. That is a plug in from Firefox. The instructions say to go to the Firefox menu, click on tools then plug-ins. Of course when I go to tools plug-ins is not immediately available, but when I do go to plug-ins, I am to click on Microsoft Office 2010. This plug in is supposed to allow earlier versions of office documents to be viewed as well as Office 2010. The plug-in is not available. When I search the Firefox website I am not able to find such a plug-in.
    I am using Microsoft XP, Office 2007 and the version of Firefox prior to V4. V4 does not support all of my e-mail clients so am not able to use V4.

    I am using Microsoft XP, Office 2007 and the version of Firefox V4 but I have this same problem.

  • How to open a Excel file and display on the custom screen

    Guys, I am new to screen programming. In my first screen (SCREEN #9000) I want to put a field, where I must be able to select a file from my desktop and when I click the DISPLAY button, it should suck all the data from the spread sheet in to an internal table, and should display the next screen  (SCREEN #9001), displaying the data from the internal table along with a button called LOAD. Now when I click the LOAD button after reviewing the data, it must load the data to my custom table in R/3. I know how to load an Excel spreadsheet to R/3 without the custom screens. But my requirement now is to do from custom screens like I mentioned above. Any ideas how to do this? Thanks.
    Dan

    Hi Dan,
    In my first screen (SCREEN #9000) I want to put a field, where I must be able to select a file from my desktop and when I click the DISPLAY button, it should suck all the data from the spread sheet in to an internal table, and should display the next screen (SCREEN #9001)
    For  this create a MPP program and create a Push button. Write the code for this to open a file like use f4_filename.From here you are able to select a file.
    + displaying the data from the internal table along with a button called LOAD. Now when I click the LOAD button after reviewing the data, it must load the data to my custom table in R/3.+
    With the above you are able to open a file and now you have to load that data into internal table. Select the file from the desktop.
    Totally you have to create 1) Screen 2) Push button( Open File) 3) Load data ( From file) .
    [Create Push Buttons|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/content.htm]
    Check this if there is any please post.
    Regards,
    Madhu.

  • I want to open a txt file and output data through an AO-using DAQmx for PXI

    I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
    Any idea?

    What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.

  • Want to open a excel file from remote Linux server through ADF UI

    HI,
    My scenario is a excel template is located in LInux server in a directory. Then I need to download this excel file when I click on a hyperLink which will call the method mentioned below.
    however, below method works fine if the file is on windows machine/server but not if on Linux machine. In case of LInux it gives junk file.
    please suggest if any solution exists.
    Thanks,
    Sachin

    Moderator Action and Advice:
    @ user8106712,
    Your post has been split away from the completed 2006 thread you had resurrected.
    Hijacking someone else's discussion is poor forum etiquette.
    When you do that you are saying:
    "My issue is more important than yours. Ignore all that earlier stuff and just pay attention to me."
    If you want considerate responses, always start your own new post.
    You may also need to occasionally review the OTN Forums FAQ that is linked at the top corner of every page.

  • I want to open a text file and display it within Lookout 5.0

    How do you read and display a text file within Lookout 5.0?

    Hi Kenneth,
    This should have been trivial, but isn't. Well, it isn't that difficult either. Here's the trick:
    Create a DataSocket Object. For the URL, type: file:c:\ni\lookout5\test.txt[text]
    Leave the Update mode as Automatic for now. Connect a Switch to the Connect member of the DataSocket object.
    On the panel, drag-and-drop the DataSocket.data.txt. Toggle the Switch and voila you have the text in Lookout! I have attached an example (detach the txt file to your C drive; or change the path in the DataSocket object).
    For the curious, DataSocket is a NI networking technology which supports ftp, http, file, and other protocols. See this
    >FAQ f
    or general info' on DataSockets.
    Hope this helps,
    Khalid
    Attachments:
    test.txt ‏1 KB
    readtext.lks ‏2 KB

  • How to activate another worksheet in excel file and write data into it

    Hi,
    I am writing an automation program to collect test data and write the data to an excel file.
    The excel file has several worksheets and now I can only write data to one sheet. Can anyone please let me know how to activate another worksheet and write data into it? Thank you very much.

    You can do a search in the Example Finder for more Excel VIs.
    They will give you a clearer idea of how to go about doing things in the way you need.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How to open an Excel file and work on it

    I have some files from my previous notebook (HP) in Excel. I cannot open it at my Mac and work on it, how can I solve this problem?

    Download the free LibreOffice suite
    How to download and install programs

  • How to loop through Multiple Excel sheets and load them into a SQL Table?

    Hi ,
    I am having 1 excel sheet with 3 worksheet.
    I have configured using For each loop container and ADO.net rowset enumerator.
    Every thing is fine, but after running my package I am getting below error
    [Excel Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may
    be error messages posted before this with more information on why the AcquireConnection method call failed.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified
    in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by
    another user, or you need permission to view and write its data.".
    Pleas suggest me the correct way of solving above issues.
    Thanks in advance :)
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi ,
    Please refer the below link for Looping multiple worksheet in a single SQL Table.
    http://www.singhvikash.in/2012/11/ssis-how-to-loop-through-multiple-excel.html
    Note:-If you using excel 2010 then you have to use EXCEL 12.0 .
    Above link explaining  step by step of Looping multiple worksheet in a single SQL Table.
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

  • How to read a CSV file and Insert data into an Oracle Table

    Hi All,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .
    Please let me some suggestions on this.
    Thanks,
    Chandra R

    jeneesh wrote:
    And, please don't "hijack" 5 year old thread..Better start a new one..I've just split it off to a thread of it's own. ;)
    @OP,
    I have a Clob file as a in parameter in my PROC. . File is comma separated.need procedure that would parse this CLOB variable and populate in oracle table .You don't have a "clob file" as there's no such thing. CLOB is a datatype for storing large character based objects. A file is something on the operating system's filesystem.
    So, why have you stored comma seperated data in a CLOB?
    Where did this data come from? If it came from a file, why didn't you use SQL*Loader or, even better, External Tables to read and parse the data into structured format when populating the database with it?
    If you really do have to parse a CLOB of data to pull out the comma seperated values, then you're going to have to write something yourself to do that, reading "lines" by looking for the newline character(s), and then breaking up the "lines" into the component data by looking for commas within it, using normal string functions such as INSTR and SUBSTR or, if necessary, REGEXP_INSTR and REGEXP_SUBSTR. If you have string data that contains commas but uses double quotes around the string, then you'll also have the added complexity of ignoring commas within such string data.
    Like I say... it's much easier with SQL*Loader of External Tables as these are designed to parse such CSV type data.

Maybe you are looking for

  • New MacBook Pro can't connect to D-link router

    Hi everyone! I just upgraded from an early 2007 MacBook Pro to the latest 15" MacBook Pro with Core i7 chip. Did a full migration with the Migration Assistant. Everything went fine. Could connect effortlessly with my Airport Extreme Base Station at h

  • How do I get the music from my ipod onto Itunes?

    I have had my ipod nano for a loooooong time and in a turn of events, most of the music on it isn't on my Itunes account. How do I transfer it safely? 

  • Logitech c270 Works, but not in HD

    Hello. I purchased a Logitech c270 webcam on the cheap end because I needed a webcam, but wanted a 720hd cam as well. The hd aspect works with all other applications, however in Skype the resolution is restricted to the standard webcam size, and I ca

  • One card of 48 ports has been reloaded in Cisco 7600

    Hi, I've a Cisco7600 with some 10/100/1000 cards. One of them has been reloaded by the Catalyst and appears the next message: %C6KPWR-SP-4-DISABLED: power to module in slot 12 set off (Fabric channel errors) What could be the cause or the faulty comp

  • Releasing forecast to PP/DS directly from an infocube

    Hi, has anyone of you ever tried to release an forecast directly from an infocube (i.e. without using DP), is that possible? Maybe there is already a report? Thanks in advance, Niko