Import from excel to form

Hi All,
I'm importing data from excel to forms.
I'm Importing the data from the first worksheet.
For this I'm using the code
OLE2_DEC.V_EXCEL_WORKSHEETS := CLIENT_OLE2.GET_OBJ_PROPERTY (OLE2_DEC.V_EXCEL_WORKBOOK, 'Worksheets');
V_LIST := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG (V_LIST, *1*);
Here the Number '1' in the above line specifies that the data from the first worksheet is to be imported(that is left most worksheet in the excel).
Now I have more than one worksheet(in the same Excel sheet) from where the data is to be imported.
Due to the above code Everytime I want to import data from work sheet other than the first, I'm making the worksheet to be imported to be the first sheet(left most).
So, to avoid this Can I loop something So that I will get all the data from all the work sheets in the Excel avoiding Manuall adjustment of the worksheets.

So, to avoid this Can I loop somethingDid you try it? Maybe something like
OLE2_DEC.V_EXCEL_WORKSHEETS := CLIENT_OLE2.GET_OBJ_PROPERTY (OLE2_DEC.V_EXCEL_WORKBOOK, 'Worksheets');
FOR i IN 1..MAXNUM LOOP
  V_LIST := CLIENT_OLE2.CREATE_ARGLIST;
  CLIENT_OLE2.ADD_ARG (V_LIST, i);
END LOOP;

Similar Messages

  • Import from excel to forms

    Hi All,
    I have a request from the client to import the data from an excel file on to forms.
    We are using 9iDB , 9iDs and 10g IAS . Please help.
    The scenario is the client recieves some quotation in excel files which always will be in a standard format.So either all of the values of excel or some values from it needs to be loaded like the price which a vendor is quoting.
    The form is in Master Detail format.
    I would apprecitae if some one can give me example source code also while replying.
    Thanks all

    Firstly, is it a true xls file or a csv ?
    Even if it has an xls extension you may find that it is actually in csv format.
    Open it in notepad and see whether it is simply data or whether it contains excel code.
    If it is a csv there is no need for OLE. You could read it direct into the form using TEXT_IO or use sqlloader from a host command. To use sqlloader you may need to use webutil file transfer or some other method first to get it onto the application server.
    If it IS a true xls you can use OLE, or to be more precise for web forms, CLIENT_OLE2, part of webutil. This can be used to load the data direct into the form. However, it is not particularly quick, and I have found that if there is a lot of data involved, it is better to use CLIENT_OLE2 to do a save-as to create a csv and then load that.

  • Web Form Import From Excel Error

    Hi all,
    I've an issue regarding the import from Excel function in HFM (9.3.1) web forms.
    First of all I export in Excel a form, I input data in yellow cells and then I save the file (I don't change the file extencion that remains xls).
    Finally I try to import the modified form by using Import from Excel function.
    Once the system finish to load shows me a windows saying that "The data have been saved to the DB" (or something similar) but when I open the web form there are no data.
    I've checked carefully the POV and it's the same and I'm using an administrative user.
    What can I try to do to fix this issue?? Am i doing something wrong?
    Thanks in advance
    Giacomo

    We submitted a bug report about this in May, 2009.
    Bug.7381401--- DATA'S NOT GETTING UPDATED AFTER IMPORT WDEF FROM EXCEL 2007.
    After updating from 9.3.1 to 9.3.3, the issue has been resolved. I would assume the bug detail is unpublished, which is unfortunate as this info would pop up in a search of the Oracle Support KB and help out others with the same issue.

  • Upload data from excel to forms 9.0.4 using webutil 1.0.5

    Hi,
    can anybody provide me the code how to upload the data from excel to forms 9.0.4 using ole2 fuction. From forms to excel it is working fine.
    Regards

    Hello,
    Instead of selecting one key figure in data view, please select all key figures of the planning book and then try all the steps which you have carried out.
    please revert after you carry out this.
    Regards,
    Prafulla

  • How to upload data from excel to form using webutil

    Hi,
    In the sample provided by Oracle
    http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
    Note 247606.1 How to Copy Records From a Form Into Excel
    It shown the methods of how to copy data from form to excel but is there any sample to provide the step on how to read the cell from excel into Form in 10g.

    declare
    args client_ole2.list_type;
    application client_ole2.obj_type;
    vworkbooks client_ole2.obj_type;
    vdoc     client_ole2.obj_type;
    vworksheet     client_ole2.obj_type;
    vrange               client_ole2.obj_type;
    begin
    -- create app object
    application := client_ole2.create_obj('Excel.Application');
    client_OLE2.SET_PROPERTY(application, 'Visible','True');
    -- get workbooks object
    vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
    -- and open a file
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
    vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- get a worksheet object
    -- for this to work you need to know the sheet name or its index
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 1); <-- name or index
    vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);          
    client_ole2.destroy_arglist(args);
    -- get a range object which in this case is just a cell
    -- for this to work you need to know the cell coordinates
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'B6');          
    vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
    client_ole2.destroy_arglist(args);
    -- and here you get the value
    message(client_ole2.get_char_property(vrange,'Value'));
    -- release objects          
    client_ole2.release_obj(vrange);
    client_ole2.release_obj(vworksheet);
    client_ole2.release_obj(vdoc);
    client_ole2.release_obj(vworkbooks);
    client_ole2.release_obj(application);
    end;

  • Can someone help me change the line width of my numbers table, its not set to thin or none and its stuck on .25. its a spreadsheet i imported from excel.

    Can someone help me change the line width of my numbers table, its not set to thin or none and its stuck on pt25. its a spreadsheet i imported from excel.

    MR,
    Apparently the import wasn't a good one.
    The best option at this point might be to start a new table. Insert a new Table, Copy the old table cell range, select the first cell in the new table and Edit > Paste and Match Style. This will throw out all the old formatting. A bit of work, but a nice clean start.
    Jerry

  • Issues with importing from excel

    I have been running into a several issues with importing from Excel.
    First my configuration
    I am running SQL Developer ver 1.5.5 Build MAIN-5969
    I am on a Windows XP Professional Version 2002 with Service Pack 3
    I am importing into an Oracle 10g database.
    1. SQL Developer doesn't work on Excel 2007, I have to save all my files into Excel 97-2003 format before I can use them.
    2. If I run into an error loading and stop the process, SQL Developer doesn't release the Excel file and I get a sharing violation if I try to save the spreadsheet without closing SQL Developer.
    3. I have found that I have to set print area to the area I want to work with, otherwise the import wizard tries to keep adding rows.
    4. When using the Import wizard, it keeps adding commas on fields with numerics unless I specify the column in excel as text. Currently the column is formatted as General in the spreadsheet or I can change the wizard format to say the column is an integer, but it actually is just a code field with numeric characters so it may have leading zeroes that I need to keep.
    This might be related,
    I have a column in excel defined as text but only contains numerics. It is of length 4, but the wizard sets a precision of 5 with a datatype of VARCHAR2. If I try to change it to 4, I get an error saying the field is not large enough. Yet, when I do a LEN on the column, it only gives me a 4. I have other fields in the same sheet that a 3 position numeric and 2 position numeric and those are fine. I am thinking this is related to the comma being inserted in a numeric field for anything greater than 3 positions.
    5. Importing excel dates to oracle dates doesn't work. I have to convert the excel date column to text then import as a VARCHAR, then convert to Date once in the database.
    6. The default of nullible is not set on any columns and I have to set them before the import. (I would prefer it set to nullible and I have to uncheck the box to make it not nullible. I would prefer to import all of the data and then deal with the nulls after they have been pulled in)
    7. When I select header columns included it uses that as the column names. Is it possible to do the name length check then? It has bit me a few times where I try to import and forget to check the name length and then I get an error when I start running the import.
    8. If one of the columns to import has all nulls, then the precision comes out to 0 and if it isn't changed an error occurs on import. Could this situation default to a precision of 1?
    9. It would be nice if there was a completion message displayed and a cancel option while running.

    On point 3.
    I have a column in excel that consists of numbers. 4 digit numeric codes. Ex, 1111, 2345, etc
    The column's format is general. It displays as just 4 numbers.
    When I start the wizard initially, the column appears with data as 1,111, 2,345, etc, on the Data Preview screen.
    It determines the precision to be 5 on the column definition screen.
    If I change the precision to 4 then continue, that field will error out when I verify with "not big enough to hold the data in source columns"
    If, I change the excel column to a TEXT column.
    Excel still displays as 1111, 2345, etc
    The wizard then displays the same data 1111, 2345 on the Data Previeiw screen
    Yet, when I get to the column definition screen it still sizes it as a 5
    If I change it to a 4, I get the same error when verifying.
    If I leave them alone as 5, then it processes just fine.

  • Error Message in Data IMport from Excel

    Hi All
    Please can you help - I am trying to import some BP data using the option in the menu Administration - Data Import/Export - Data Import from Excel.
    I have created my import file as a text file and provided the relevant mappings. Having located my text file, I then get the following error message:
    Row Number 1:Internal error (-2007) occurred.
    Has anyone got any ideas as to what this means I've done wrong?
    Thanks

    Dear, 
    Kindly refer to note 1296487 below:
    Symptom
    In attempt to import a Business Partner from an Excel file to SAP
    Business One, the following error messages are displayed and the
    Business Partner is not imported:
        o  When there are no House Banks in the company, the following error
           messages are displayed:
        Row Number 1: Internal error 'House Bank Accounts' occurred,
    and,0 Records imported successfully.
         o  When there are no Payment Methods in the company, the following
            error messages are displayed:
         Internal error 'Payment Methods for Payment Wizard' (OPYM)
    (-2007) occurred, and, 0 Records imported successfully.
         o  When Payment Methods and House Bank are defined in the company,
            the following error messages are displayed:
         Row Number 1: Internal error (-2007) occurred, and,
         0 Records imported successfully.
    Other terms
    DB, export, BP
    Reason and Prerequisites
    Application error
    Solution
    SAP intends to provide patches in order to solve described problem.
    The section Reference to related Notes below will list the specific
    Patches when available.
    The corresponding Info file of Patches on SAP Service Marketplace will
    show the correction / SAP Note number also.
    Be aware that these references can only be set at Patch release date.
    SAP will deliver Patches only for selected Releases at its own
    discretion, based on the business impact and the complexity of the
    implementation.
    If it is your case, We would like to inform you that we plan to fix the problem you raised,
    in patch 05 for SAP Business One 2007 A FP01 / SP01 Release.
    For SAP Business One Patch Delivery Schedule please look at:
    http://service.sap.com/smb/sbo/patches
    Best regards,
    Apple

  • Data Import from Excel - Users Logged on

    Hello all,
    I am new the forums and am learning SAP from a user and administrator perspective so please excuse if some of my questions seem obvious.  I appreciate everyone's help very help
    I have the task of setting up two new company profiles in addition to our current one.
    I am at the stage of importing Item Master and Business Partner data.
    1) What is the preferred method?  DTW vs. Import from Excel?  Is one more suitable then the other for this purpose?
    2) The help file for importing via excel states "If SAP Business One is running on a network, you have ensured that other users will be logged off the system during the import."  Could someone please explain:
    - What are the risks of running DTW or imports while users are logged in?
    - If users are logged into the live version of our company but I am testing DTW/excel imports from a TEST copy of that company are there still risks or is this okay?
    - If users are logged into one database but I am performing data imports on a different company database (for example I would be the only one logged into the companies currently being set up - is this okay even though users are logged into SAP server but accessing a different company?)
    Thanks very much!
    Richard

    Hi Kiwi,
    Referring to the Rules of enagement you have to post one thread per question. Please adhere to the rules from your next post.
    DTW is the very much Preferred method you have simulation to see if you record are find to be imported before importing to the DB, using DTW Import from Excel will only help importing  BP and Item master data. If you have to make any updates then it will be a task again. In DTW you can save the template and keep adding data and changes can be updated from the template and re-imported
    Please refer to the link below to "Differences between the Import From Excel and Data Transfer Workbench templates" the screen shots for DTW are from version before 2007A SP01 PL09.
    [http://wiki.sdn.sap.com/wiki/display/B1/DifferencesbetweentheImportFromExcelandDataTransferWorkbenchtemplatesandwhathappenswhentheyare+interchanged.]
    1. When users are logged on It can cause some inconsistency, ensure no user is logged on the live DB before performing any major DTW import
    2. It will be ok if you are Test importing data to test DB on the same SQL server.
    Regards,
    Rakesh N

  • Data Import from Excel for Items

    I have used the data import for items, in the past , to import the prices for existing item. I am using this for the first time in SAP version 9.0. There are new fields due to the additional currencies. In an running a test with two items and two price list codes, code 1 and code 10. When I run the import gets stuck in a loop and keeps giving me errors on line 1 with invalid price code.
    I want to import two price lists Price List 1 and Price List 10. For example I want price list 1 to be $10.00 and price lit 10 to be $5.00
    In the import from excel I have the following fields
    A  Item Number
    B  Price List Code
    C  Unit Price - Primary Currency
    D  Primary Currency
    E  Unit Price - Additional Currency 1
    F  Additional Currency 1
    G  Unit Price - Additional Currency 2
    H  Additional Currency 2
    I  UoM Code
    J  Price List Code
    K  Unit Price - Primary Currency
    L  Primary Currency
    M  Unit Price - Additional Currency 1
    N  Additional Currency 1
    O  Unit Price - Additional Currency 2
    P  Additional Currency 2
    Q  UoM Code
    I am using the following columns
    A item number
    B 1
    C 10.00
    J 10
    K 5.00
    This is the way I use this function in SAP versions 2007 and 8.8
    Any suggestions
    Dennis

    Hi Gordon,
    I tried what you suggested, but does not work. I tried with two items, when I run the import SAP gets stuck in a loop displaying error lines. The only way to stop is to restrt SAP.
    I attched a screen shot of the error

  • SQL Developer: import from Excel bug

    SQL Developer 1.1.2.25 Build MAIN 25.79
    This is a test for import from Excel.
    Test table:
    create table bla
    (x number null,
    y varchar2(1) null);
    Excel data:
    x y
    1 a
    2 b
    3
    SQL Deveoper generates:
    Error at line 3:insert into BLA (X,Y) VALUES(3,'NULL')
    IMPORT into table BLAcomplete
    Inserted 2rows.
    Failed to insert 1rows.
    SQL Error:ORA-12899: value too large for column "BCRCEK"."BLA"."Y" (actual: 4, maximum: 1)
    I think there is a bug, because there must be generated NULL without apostrophe.
    insert into BLA (X,Y) VALUES(3,NULL);

    Hi Barry,
       That's[b] GREAT NEWS !!!.
       So, i just update current release 1.1.2.25 to 1.1.2.25.79 ?
    Thanks for the great work.
    Zack
      Oops !!! Am already using 1.1.2.25.79, same as bcrcek above. So need to wait for Patch Release ?
    Regards
    Zack
    Message was edited by:
            Zack.L                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Need sql query to import from excel sheet

    Hey , i need sql query to import from excel sheet.
    i work in a company where i need to daily update the data from excel sheet.
    if i get a shortcut method i ill be very thank full to you guys to reduce my work upto 10 %.

    any query which can inert from excel file?
    Sort of. Certainly not anything as simple as what you seem to hope for. Check out this very good PHP class:
    PHPExcel - Home

  • DDE - From EXCEL to FORMS

    Hi!, I have used (DDE PACKAGE) to get data from EXCEL SHEETS into ORACLE FORMS, and it worked properly , my question is if there is a way or idea (Other than using TIMERS) to have a link between the - Very frequently changed EXCEL cells - and ORACLE FORMS that would keep intouch with the most recent updated EXCEL cells.
    Please note that I could solve the problem using timers but that was against the overall performance.
    Thanks,
    Firas AlKhatib

    Hi Firas AlKhatib
    Pls Can U send me the form which transfers data from excel into forms?
    I'll be gratefull to u...
    Prashanth Deshmukh

  • Import from Excel to Project - blanks cells are having dates automatically added

    Hi. I'm very new to Project but have started setting up a Roadmap using it which is working fairly well so far, although have hit one snag.
    I have data in Excel: it is a list of projects with 4 columns containing the dates of various stages (planning, initiate, execute, close). I have created a reusable map so this can be imported into Project and the Gantt chart to show pre-defined markers
    on the timeline for each stage on each project row. All well and good so far.
    However, not all of the projects in Excel have all of their dates defined. E.g. a project might not yet have a close date. But when this is imported into Project a date gets applied for it. I have no idea why!
    How do i get the import into Project to allow any blank cells from Excel to remain as blank so that nothing is plotted on the Gantt chart for that particular section?

    Thanks for both of your replies. I have tried this and the same issue occurs. I have checked each row in the imported Project data and they are all showing as set to 'manually selected' yet at some point in the import Project is adding data to blank cells.
    I have retried using a simple test excel sheet and when this too is mapped into Project, any blank cells get populated with the date that appeared in the preceding row for some reason:
    I can then go through and manually delete this cell in Project (which then replaces it with an "NA") - but if i have to manually do this whenever importing from Excel into Project then it makes it very time consuming.
    Surely there must be a way for Project to not auto-populate blank cells? Or am i missing something fundamental?

  • Import from Excel not escaping quote (')

    Hi,
    I'm having problems with text fields in an Excel spreadsheet that contain single quotes (') not being escaped when the insert commands are built using the Import from Excel wizard.
    It's pretty much the same problem as that described in the post below (but for importing Excel spreadsheets):
    <Re: DDL in the SQL tab does not escape apostrophes
    SQLDev 1.2.1.32.00
    WinXP SP2
    Excel 2003
    Any chance of getting this fixed?
    Thanks,
    Simon

    OK, so have updated to
    SQLDev 1.2.1.32.13
    and still see problem when importing from Excel.
    The generated SQL looks like this:
    insert into INV_CONTAINERS (CONTAINER_NAME) VALUES('Tetramethylethylenediamine, N,N,N',N'-');
    That's supposed to be just one item in the VALUES term.
    Is there another way to do this? If not, how do I lodge this as a bug?
    Simon

Maybe you are looking for