How to read/insert MS .xls  record into Oracle without .csv conversion etc.

i really have this challenge to download .xls file at oracle level. In other word no apache utility like Sheet etc. need to use. Any thin at oracle level is permitted though. E.g. stored procedure/ function etc.
File is as such in .xls format. Not text or .csv or any other delimitered.
Thanks

Can you explain exactly why these limitations are in place? That would really help us figure out whether any of the options we might be able to suggest would work for you. A few options off the top of my head:
- There are various Java libraries that can parse at least some reasonable subset of Excel formatting. I'd expect that you could probably load one of those into Oracle and write a Java stored procedure that would parse the file. Of course, I'm not sure whether that falls into your "at Oracle level" bucket or into your "no Apache utility" bucket.
- Oracle APEX has various Excel upload utilities, but that requires the use of APEX which might not be trivial to integrate with an existing application.
- Heterogenous Services with Generic Connectivity would allow you to create a database link over ODBC to an Excel file and to query the Excel data via SQL. That requires, though, that there is an ODBC DSN for the Excel file and probably requires that your Oracle database is on Windows.
Justin

Similar Messages

  • How to speed insert my 1000000 records into the database?

    my code like:
    <cfloop from="1" to="#inserteddb.getrecordcount()#"
    index="x">
    <!----
    Here make the InsertFieldList and InsertValueList
    --->
    <cfquery datasource="#cfdsn#" name="insertdata">
    insert into inputtest (#InsertFieldList#)
    values (
    <cfqueryparam value="#InsertValueList#"
    cfsqltype="cf_sql_varchar" list="yes">
    </cfquery>
    </cfloop>
    The test inserts 100,000 records, has spend I 30 minutes
    time,but I have 1,000,000 record to insert , is there any way to
    enhance the insertion speed?
    Thanks a lot.

    By removing ColdFusion from the process as much as possible.
    Where is the 'insertedDB' data coming from? It looks to be a
    record set?
    Are you moving data from one data source to another? If so,
    some DBMS
    have the ability to insert an entire record set in one step.
    I do not
    have the exact syntax at my finger tips, but I have done
    something like
    this in the past with Oracle. INSERT INTO aTable SELECT FROM
    bTable.
    Are you building a record set from a text file such as CSV?
    If so, many
    DBMS have the ability to do 'bulk' inserts from such text
    files and CF
    does not even need to be involved.
    As you can see, knowing exactly what are you working with
    will help us
    provide suggestions an how to improve your process.

  • I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    I`d like to know how can i insert documents, xls/doc/pdf into iCloud and have them in my iPhone and my iPad. I just found one way, through ibooks, but i think it isn't a practical option.

    Just use Drop Box instead.

  • How do I insert/update certain records that I've identified in cursors..?

    Morning gurus..
    As the title asks, I have this script that loads records into a temp table then compares these with whats in the ORACLE table. When each temp table record has been identified as being either needing to be inserted or not, how do I then insert these identified records? As in, how can I do..
    INSERT INTO xxxxxxxxxxx_SUPPLIERS (vendor_id, vendor_name,segment1, end_date_active) VALUES (2, 'SUPPLIER NAME 2', 100002, sysdate); ..but I'll need to put in some variable names where the values have been written in above - is this allowed..?
    thanks,
    E

    hi,
    here is a small sample for your query.... given Procedure InsertExcep is reading data from table code_master and inserting all fetched records into another table test_code_master..... before insert you can do any comparison within loop..... or even can give any Update statement....
    CREATE TABLE code_master
    CODE VARCHAR2(10),
    CODE_DESC VARCHAR2(70)
    INSERT INTO CODE_MASTER ( CODE, CODE_DESC ) VALUES (
    'ORG0007', 'PARTNERSHIP FIRM');
    INSERT INTO CODE_MASTER ( CODE, CODE_DESC ) VALUES (
    'ORG0008', 'CONSULTANCY FIRM OR PROFESSIONAL BODY');
    INSERT INTO CODE_MASTER ( CODE, CODE_DESC ) VALUES (
    'ORG0009', 'SOCIAL ORGANIZATION');
    INSERT INTO CODE_MASTER ( CODE, CODE_DESC ) VALUES (
    'ORG0010', 'EMBASSY');
    CREATE TABLE test_code_master
    CODE VARCHAR2(10),
    CODE_DESC VARCHAR2(70)
    CREATE OR REPLACE PROCEDURE InsertExcep
    AS
    CURSOR insertdata
    IS
    SELECT code,code_desc
    FROM code_master ;
    BEGIN
         FOR i IN insertdata
         LOOP
                   BEGIN
                   INSERT INTO test_code_master (code,code_desc)
                   VALUES(i.code,i.code_desc);
                   EXCEPTION WHEN OTHERS THEN
                   DBMS_OUTPUT.PUT_LINE ( 'Error during Insert code - '||i.code );
                   END;
         END LOOP;
    EXCEPTION WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE ( 'Error in InsertExcep' );
    END;
    hope this will work...
    Thanx
    MB

  • Best way to insert millions of records into the table

    Hi,
    Performance point of view, I am looking for the suggestion to choose best way to insert millions of records into the table.
    Also guide me How to implement in easier way to make better performance.
    Thanks,
    Orahar.

    Orahar wrote:
    Its Distributed data. No. of clients and N no. of Transaction data fetching from the database based on the different conditions and insert into another transaction table which is like batch process.Sounds contradictory.
    If the source data is already in the database, it is centralised.
    In that case you ideally do not want the overhead of shipping that data to a client, the client processing it, and the client shipping the results back to the database to be stored (inserted).
    It is must faster and more scalable for the client to instruct the database (via a stored proc or package) what to do, and that code (running on the database) to process the data.
    For a stored proc, the same principle applies. It is faster for it to instruct the SQL engine what to do (via an INSERT..SELECT statement), then pulling the data from the SQL engine using a cursor fetch loop, and then pushing that data again to the SQL engine using an insert statement.
    An INSERT..SELECT can also be done as a direct path insert. This introduces some limitations, but is faster than a normal insert.
    If the data processing is too complex for an INSERT..SELECT, then pulling the data into PL/SQL, processing it there, and pushing it back into the database is the next best option. This should be done using bulk processing though in order to optimise the data transfer process between the PL/SQL and SQL engines.
    Other performance considerations are the constraints on the insert table, the triggers, the indexes and so on. Make sure that data integrity is guaranteed (e.g. via PKs and FKs), and optimal (e.g. FKs should be indexes on the referenced table). Using triggers - well, that may not be the best approach (like for exampling using a trigger to assign a sequence value when it can be faster done in the insert SQL itself). Personally, I avoid using triggers - I rather have that code residing in a PL/SQL API for manipulating data in that table.
    The type of table also plays a role. Make sure that the decision about the table structure, hashed, indexed, partitioned, etc, is the optimal one for the data structure that is to reside in that table.

  • How to read a whole text file into a pl/sql variable?

    Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?

    how to read a whole text file into a pl/sql variable?
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....

  • I have powerpoint for Mac on my imac.  I can't seem to get the active text box function to work like it did on my PC.  How can I insert an active textbox into a presentation that will allow me to type while presenting?

    I have powerpoint for Mac on my imac.  I can't seem to get the active text box function to work like it did on my PC.  How can I insert an active textbox into a presentation that will allow me to type while presenting?

    I've gotten a little further on this. The dynamic select is
    working fine. It's the "a href" code that isn't. I'm wondering if
    someone can look at this line and tell me if it's okay to build the
    query string this way. The storeid comes through fine but I'm still
    not getting the employeeid value to pass. Here's line that's not
    working:
    td><a href="registerStoreCust.php?storeid=<?php echo
    $row_storeRS['storeid']; echo "&employeeid="; echo
    $_GET['employeeLM']; ?>">Register
    Customer</a></td>

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel?

    I have 5 of them all containing nested Apdiv within nested ApDivs (a long storie ) that I would like to insert into 5 tabs in the Spry Tabbed Panel.
    Please help.

    "Hi Gramp,I realize I have made hard work for myself but I really don't know any better. I also realize now that taking on this project may have been a mistake :-)I taught myself how to use the design side of Dream Weaver. These five ApDivs were created in the content area of the spry tool and it worked fine. (yes a lot of work though)For the first time I looked at the code side. I wanted to try to bring a peace of code from another page for something unrelated and when it didn't work I took it out and without noticing, deleting a line from the Spry tool.Of course like a classic newbe I was working without a backup copy so here I am. Loosing hours of tedious work and on the verve of tears :-)I do have some  questions though.  My APDiv
      What does "apDiv1" stands for and what does "My APDiv" stands for?Is the only thing I have to do is changing this line for my five ApDivs and paste it in the appropriate places in the code? Thanks again,Gilaad
    Date: Sat, 16 Jun 2012 20:39:07 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel? 
        Re: How can I insert an existing ApDiv into a tab in the Spry Tabbed Panel? 
        created by Altruistic Gramps in Spry Framework for Ajax - View the full discussion 
    You have really made hard work for yourself by using APDiv's. I suppose it can be done, but I would not. To answer your question, I have create an example as per#apDiv1
    My APDiv
    Content 2
    Tab 1
    Gramps 
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4498679#4498679
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4498679#4498679. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Spry Framework for Ajax by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • HT3529 How do I insert a pdf file into my message?

    How do I insert a pdf file into my message? please help!

    thank you James! I suspected that this could be the solution, but i am new to iPads and it is a pain to find a file on iPad in order to do this operation, in windows there is windows explorer and i cannot see anything like that on iPad.. any hints would be appreciated!

  • How do I insert a video clip into the timeline?

    Do you happen to know how I could insert a video clip into the middle of a movie like you do in FCP? Can you add tracks and insert the clip above the spot i need to change for each movie.
    I don't want to render the whole movie (convert it into a MPeg2) each time.

    No - DVD timelines are a little different to FCP. If you need to add a clip to the stream, you need to split the exisitng clip (you could trim it back to where you want to insert the new piece) and drag the new piece onto the same timeline. If you trimmed the existing piece then add another instance of it to the timeline and trim the new part from the left until you get to what you want as the out point.
    If you have a collection of video clips on your DVDSP timeline, simply dragging a new one on will shuffle the others along appropriately. However, the audio will not shuffle with them, and you'll end up moving it all manually.
    The very best thing is to create the timeline precisely as you want it in FCP and encode it to MPEG2 before bringing it in to DVDSP. Remember that DVDSP is not an editor, it is a place to assemble your work - it won't do anything remotely like FCP in that respect.

  • HT1518 I have a Universal Keyboard how to I insert the copywrite symbol into my photographs

    Have tried but to no avail, how can I insert the Copywrite symbol into my photographs to protect them before posting online please.

    Alberto Ravasio wrote:
    You meant option+C
    Nope. On an English keyboard you get © with option-g. Option-c gets you ç.

  • How do I insert a URL link into a text document

    How do I insert a URL link into a Word document

    Don't have Word available to test, but it seems to depend on the program.
    In Pages and TextEdit, if you drag the favicon from the addrss box in your browser into the document, it will be pasted in already formatted as a clickable link expressed in plain text. The favicon (I think that's the name for that element) is this item -
    However, in AppleWorks 6.2.9, all that did was drop the raw URL into the document; and it is non-clickable, just text. In AW 6 you need to type the plain-text name for the link (how you want the underlined bit to appear), select that, then go to the Format menu and select Create Link, from it choosing Internet. In the new screen, the linkname will already be entered in the upper box; paste the URL into the lower box, and it's done.

  • How could I insert the deleted row into another table within a trigger?

    Hi,
    How could I insert the deleted row into another table within a trigger? The destination table has the same columns as the source table. Since the statements are in the trigger, it is not allowed to query the source table named 'test'. Thanks! The trigger is as follows, uncompleted:
    CREATE TRIGGER delete_trigger
    AFTER DELETE
    ON test
    FOR EACH ROW
    BEGIN
    -- How could I insert the deleted row into another table
    END delete_trigger;
    Message was edited by:
    user569548

    Hi,
    I'm not sure what's wrong there.
    I read the oracle docs about ANALYZE and ALL_TAB_COLUMNS, and did the following:
    ANALYZE TABLE my_tab VALIDATE STRUCTURE; //went ok.
    SELECT column_name
    FROM all_tab_columns
    WHERE table_name = 'my_tab'; //but no rows selected?
    This topic might not be what this thread should be about. Here I posted a new thread:
    How to get colum names of the newly created table?
    Thanks.
    Message was edited by:
    user569548

  • How do I insert my Edge Animation into Wordpress as an animated/interactive graphic

    How do I insert my Edge Animation into Wordpress as an animated/interactive graphic?

    Hi ColleenSyron,
    Can you check out this video: http://tv.adobe.com/watch/create-like-crazy-with-adobe-edge/episode-5-spice-up-your-wordpr ess-site-with-edge-animate/
    Thanks,
    Preran

Maybe you are looking for

  • SAV for Mac 9.2.7 released!

    Hey everyone, We released SAV for Mac 9.2.7 to all home users late last week.  This release at a glance: Compatible with OSX 10.6 - 10.10 Stability and performance improvements Updated threat engine and threat data (release notes for threat detection

  • Performance tuning in CRM server

    Hi everyone,    My CRM server working very slow. Idont know the exact reason. My server configuration IBM Xeon processor 3 Ghz 3GB RAM.There are about 25 users. Is this problem with SAP or Hardware.If any one have performance tuning document plz post

  • Windows 7, OE, and PRE Crashes

    To Whom It May Concern: I uncovered what could be a problem in OE (Organizer Elements). This could be causing crashes and numerous unexplained problems in OE and PRE in Windows 7. Please see my post in the PRE forum entitled: "Aero Problems on Win 7

  • Storing Long text more that 2000 words

    Hi all,         Can any tell me how can we save long text? 1) i need to create a table which stores long text (instead of T-code SO10). Thanks Senthil Bala Message was edited by: senthil bala

  • Bridge CS3 ratings/labels show on preview screen

    Unless I am missing something, I cannot show ratings/labels on the 'Preview' screen. Of course, they show on the thumbnails. My process is to click (arrow) through the thumbs while viewing the larger preview screen to make my ratings selections. It w