Load a excel file

Hi all,
I am sorry i am asking this question here but i cant find TOAD specific thread.
I want to load an excel file from OS to my database table using TOAD.
Can anyone tell me how to do this?
Thanks
Edited by: user10380680 on Nov 6, 2008 3:17 PM

Hi,
Check the steps given by "sbmk_design " using TOAD.
How to load excel-csv file into oracle database
Else go for
SQL LOADER
http://www.adp-gmbh.ch/ora/tools/sql_loader/example_3.html
http://lbd.epfl.ch/f/teaching/courses/oracle8i/server.815/a67792/ch04.htm
- Pavan Kumar N

Similar Messages

  • Stuck - load the Excel file dynamically with different columns and worksheet names

     I have a situation where I want to load the Excel file dynamically, and the excel file have different columns or even worksheet name. Any idea how I could
    approach this? I believe there's no way to modify the meta data (specifically the mapping) in the data flow.

    Hi Chimumu,
    The SSIS stock adapters don't supporting dynamic column mapping, to achieve your goal, you need to use Script Task/Component to read the Excel sheet name and the columns in the worksheet, and then map to the output columns of the script component. You can
    also refer to the following blogs:
    http://micktechblog.blogspot.com/2011/06/ssis-excel-import-with-unknown-number.html
    http://wikiprogrammer.wordpress.com/2011/04/08/dynamic-column-mapping-in-ssis-part-1/
    Regards,
    Mike Yin
    TechNet Community Support

  • Loading of excel file to BI

    How can we load an excel file to BI system?
    If then can we load a file having multiple sheets inside it?

    Check if you have the mapping done for it, also only the active sheet will be uploaded.

  • Loading an Excel file into a Z-Table

    Hi Gurus,
    Can somebody guide me how to load an excel file into  a Z-Table.

    Hi,
    You need to write a ABAP code for this....
    The following is the code for loading data into an internal table:
    types: begin of ttab,
           rec(1000) type c,
           end of ttab.
    types: begin of tdat,
           fld1(10) type c,
           fld2(10) type c,
           fld3(10) type c,
           end of tdat.
    data: itab type table of ttab with header line.
    data: idat type table of tdat with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      file_str = p_file.
      call function 'GUI_UPLOAD'
           exporting
                filename                = file_str
           tables
                data_tab                = itab
           exceptions
                file_open_error         = 1
                file_read_error         = 2
                no_batch                = 3
                gui_refuse_filetransfer = 4
                invalid_type            = 5
                no_authority            = 6
                unknown_error           = 7
                bad_data_format         = 8
                header_not_allowed      = 9
                separator_not_allowed   = 10
                header_too_long         = 11
                unknown_dp_error        = 12
                access_denied           = 13
                dp_out_of_memory        = 14
                disk_full               = 15
                dp_timeout              = 16
                others                  = 17.
    delete itab index 1.
      loop at itab.
        clear idat.
        split itab-rec at cl_abap_char_utilities=>horizontal_tab
                              into idat-fld1
                                   idat-fld2
                                   idat-fld3.
        append idat.
      endloop.
      loop at idat.
        write:/ idat-fld1, idat-fld2, idat-fld3.
      endloop.
    From this internal store it onto the database.....
    Sharma one more thing you must have posted this question in ABAP fourum for better results....
    Hope it helps,
    Thanks,
    Happy Life,
    Aravind

  • How to automate the loading of excel file

    Hi Guru,
    As we know we can load excel file through ODI but their is some manual work we have to do each time and it will only support in Windows platform
    How we can load excel file through ODI in Unix system and it should be automate so in one directory i got this file it should able to load the data automatically no manual intervention required.

    On windows jdbc-odbc bridge is used to read from excel file. Since such odbc setup is available only on windows hence the restriction. If there is any type 4 jdbc driver available for excel that it would works on unix too. 

  • For Each Loop Load Dynamic Excel Files

    Hi All,
    SSIS 2005
    I want to load excel file .xls one at a time files that have different names without having to select the file in the connection manager, every time. So a user can easily place the excel file in the folder and right the sql job and it loads the file data.
    The data flow tasks all work when I manually select the excel file, but I am unable to get this to work dynamically.
    I have setup a for each loop with multiples data flow tasks and sql tasks to load my data from file.
    Variables:
    @filename d:\new file\*.xls
    For Each Loop:
    ForEachFile Enumerator
    Folder: d:\new file\
    Files: *.xls
    Retrieve File Name: Fully Qualified
    Variable Mappings:
    User::filename (index 0)
    Connection Managers:
    Excel Connection Manager: Expressions, ConnectionString @[User::filename]
    Error Message: Error at new buyer(package name) the connection string format is not valid. it must consist of one or more components of the form X=Y, seperated by semicolons.
    Can anyone assist thanks.

    You still need the file name variable.
    ExcelFilePath is the fully qualified file name of your Excel file. ie. it contains both the path and file name.
    e.g. D:\inbox\myExcelFile.xls
    All the steps you mentioned are correct, except you need to set the property of ExcelFilePath of the Excel connection to the variable that you map to in the ForEach Loop:
    Connection Managers:
    Excel Connection Manager: Expressions, ExcelFilePath @[User::filename]
    Hope this helps.
    ~ J.

  • Loading 400 excel files without manually opening them???

    Hi,
    I have 400 excel files with the first 5 lines header info - nothing to do with the columns...15 merged columns
    then the 15 and another 3 columns with data.
    about half way down the file 12 over the columns turn into 6 columns (2 merged each)
    Can I write a PL/SQL script to load these?? how would you tell when a column begins?
    Again I don't want to open and SaveAs 400 files...
    Thank you for your help, Bill

    Good morning
    I have problems with the Jakarta POI example. The problem is my home java environment
    How can I configurate this java environment?
    My java version is:
    C:\Reporte\XL2ETB>java -version
    java version "1.3.1_01"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
    And the error is:
    C:\Reporte\XL2ETB>java -cp XL2ExternalTables.jar;jakarta-poi-1.5.1-final-2002061
    5.jar;jakarta-poi-contrib-1.5.1-final-20020615.jar com.saternos.database.utiliti
    es.ExternalTableGenerator new_department_data.xls
    Begin processing.
    Using working directory C:\Reporte\XL2ETB
    Exception in thread "main" java.lang.NoSuchMethodError
    at com.saternos.database.utilities.ExternalTable.<init>(ExternalTable.ja
    va:62)
    at com.saternos.database.utilities.ExternalTableGenerator.processWorkook
    (ExternalTableGenerator.java:184)
    at com.saternos.database.utilities.ExternalTableGenerator.execute(Extern
    alTableGenerator.java:106)
    at com.saternos.database.utilities.ExternalTableGenerator.main(ExternalT
    ableGenerator.java:42)
    Edited by: albrico on Oct 2, 2008 12:38 PM

  • How can I load an Excel File to a pipe-delimited .csv File

    In SSIS I am attempting to process a .xls File and I have a C# script that is reading the .xls File. My issue is this...I have some fields that have an embedded comma in them. Those fields are designated by a double quote though ". I have included my
    C# Script. I'm just not sure if I have to indicate to it that there is a field delimeter. The " double-quote is only utilized when there is indeed an embedded comma...like "Company Name, Inc"...or "Main St., Apt. 101"
    How can I read this .xls worksheet and account for the double-quotes and the embedded comma and produce a pipe-delimeted file?
    public void Main()
    // TODO: Add your code here
    // Create NEW .CSV Files for each .XLS File in the Directory as .CSV Stubs to store the records that will be re-formatted
    // in this Script.
    try
    string StringExcelPath = (Dts.Variables["User::FilePath"].Value.ToString());
    string StringExcelFileName = (Dts.Variables["User::FileName"].Value.ToString());
    string StringFileNameExtension = Path.GetExtension(StringExcelFileName);
    if (StringFileNameExtension != ".xls")
    return;
    string StringCSVFileName = (Dts.Variables["User::FileName"].Value.ToString());
    StringCSVFileName = Path.GetFileNameWithoutExtension(StringCSVFileName);
    StringCSVFileName = (Dts.Variables["User::FilePath"].Value.ToString()) + StringCSVFileName + ".csv";
    string StringExcelWorksheetName = (Dts.Variables["User::ExcelWorksheetName"].Value.ToString());
    string StringColumnDelimeter = "|";
    int IntHeaderRowsToSkip = 0;
    //FileStream stream = File.Open(StringFullyQualifiedPathFileName, FileMode.Open, FileAccess.Read);
    //// Reading from a binary Excel file ('97-2003 format; *.xls)
    //IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
    //// Reading from a OpenXml Excel file (2007 format; *.xlsx)
    //IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
    //// DataSet - The result of each spreadsheet will be created in the result.Tables
    //DataSet result = excelReader.AsDataSet();
    //// Free resources (IExcelDataReader is IDisposable)
    //excelReader.Close();
    if (ConvertExcelToCSV(StringExcelFileName, StringCSVFileName, StringExcelWorksheetName, StringColumnDelimeter, IntHeaderRowsToSkip) == true)
    Dts.TaskResult = (int)ScriptResults.Success;
    else
    Dts.TaskResult = (int)ScriptResults.Failure;
    catch (Exception)
    Dts.TaskResult = (int)ScriptResults.Failure;
    public static bool ConvertExcelToCSV(string sourceExcelPathAndName, string targetCSVPathAndName, string excelSheetName, string columnDelimeter, int headerRowsToSkip)
    try
    Microsoft.Office.Interop.Excel.Application ExcelApp = new Microsoft.Office.Interop.Excel.Application();
    Excel.Workbook ExcelWorkBook = ExcelApp.Workbooks.Open(
    sourceExcelPathAndName, // Filename
    0, // UpdateLinks ===> http://msdn.microsoft.com/en-us/library/office/ff194819(v=office.15).aspx
    true, // ReadOnly
    5, // Format ===> http://msdn.microsoft.com/en-us/library/office/ff194819(v=office.15).aspx
    "", // Password
    "", // WriteResPassword
    true, // IgnoreReadOnlyRecommended
    Excel.XlPlatform.xlWindows, // Origin
    "", // Delimeter
    true, // Editable
    false, // Notify
    0, // Converter
    false, // AddToMru
    false, // Local
    false // CorruptLoad
    // Gets the List of ALL Excel Worksheets within the Excel Spreadsheet
    Excel.Sheets ExcelWorkSheets = ExcelWorkBook.Worksheets;
    // Retrieves the Data from the EXACT Excel Worksheet that you want to process from
    Excel.Worksheet ExcelWorksheetToProcess = ExcelWorkSheets.get_Item(excelSheetName);
    // Gets the Range of Data from the EXACT Excel Worksheet that you want to process from
    Excel.Range ExcelWorksheetRange = ExcelWorksheetToProcess.UsedRange;
    // Sets the Cursor/Pointer at the Top Row of the Excel Worksheet
    Excel.Range ExcelRangeCurrentRow;
    // Deletes the Header Row and however many rows as specified in headerRowsToSkip
    for (int ExcelRowCount = 0; ExcelRowCount < headerRowsToSkip; ExcelRowCount++)
    ExcelRangeCurrentRow = ExcelWorksheetRange.get_Range("A1", Type.Missing).EntireRow;
    ExcelRangeCurrentRow.Delete(XlDeleteShiftDirection.xlShiftUp);
    // Replace ENTER, "\n", with a Space " "
    //ExcelWorksheetRange.Replace("\n", " ", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // Replace comma "," with the indicated Column Delimeter variable, columnDelimeter
    ExcelWorksheetRange.Replace(",", columnDelimeter, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // Saves Data File as .csv Format
    ExcelWorkBook.SaveAs(
    targetCSVPathAndName, // Filename (See http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.saveas.aspx)
    XlFileFormat.xlCSVMSDOS, // FileFormat
    Type.Missing, // Password
    Type.Missing, // WriteResPassword
    Type.Missing, // ReadOnlyRecommended
    Type.Missing, // CreateBackup
    Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, // AccessMode
    Type.Missing, // ConflictResolution
    Type.Missing, // AddToMru
    Type.Missing, // TextCodepage
    Type.Missing, // TextVisualLayout
    false // Local
    ExcelWorkBook.Close(false, Type.Missing, Type.Missing);
    ExcelApp.Quit();
    GC.WaitForPendingFinalizers();
    GC.Collect();
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelWorkSheets);
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelWorkBook);
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelApp);
    return true;
    catch (Exception exc)
    Console.WriteLine(exc.ToString());
    Console.ReadLine();
    return true;
    #region ScriptResults declaration
    /// <summary>
    /// This enum provides a convenient shorthand within the scope of this class for setting the
    /// result of the script.
    /// This code was generated automatically.
    /// </summary>
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion

    I would prefer doing this using a standard data flow task component in SSIS. I will choose an Excel source and a flat file destination for this.
    See how you can handle the inconsistent/embedded delimiters within files inside SSIS data flow
    http://visakhm.blogspot.in/2014/06/ssis-tips-handling-embedded-text.html
    http://visakhm.blogspot.in/2014/07/ssis-tips-handling-inconsistent-text.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Preserving prefixed zeros  in down load to excel file

    In My application lot of character field have character zero as the starting characters. Like Company code= 0600, Property= 00390898 .
      When I do a download from Internal table to excel sheet, this character fields are showing with the zeros in front like 600 & 390898. Is there any way preserve the zeros in the excel sheet ?
      Also I would Like to know How can I move the character ( '  ) . If I used ''' then it gives compile error.
        If I can prefix this character ( ' ) , the field's will be shown with the zeros.
    Thanks for your help.
    Manoranjan

    Hi Manoranjan,
    What is the data type you are using for the Company Code in your internal table?
    You can try this way.Suppose your main internal table is itab1 where in the company code is refering the database table (T001-BUKRS).
    Declare one more internal table itab2 with company code as Character data type.
    Before downloading to excel move itab1 to itab2 and then try to use that itab2 for downloading. Now your excel sheet will have the numbers with zeros preceeding.
    Another option is after downloading to excel, I think you can change the properties of the column through Format Cells->Number tab->Text.
    Thanks,
    Srinivas

  • Down load into excel file

    Hi gurus,
                 I wanna generate a report that should download the data from the internal table to the presentation server in word formart, but the length of the word file should not be greater than 156 characters as the downloaded data is sent to RBI.
    Thanks and Regards,
    Alson.

    Hi Alson,
    you can wrap the text to a length of 156 chars using the function module:-
                CALL FUNCTION 'RKD_WORD_WRAP'
    for eg if u have any variable v_text which is 1000 chars long then u can give the outputlen = 100. This way u can split 1000 chars into 1000/100 = 10 rows. you can either store these lines in an internal table or it is also possible to store these as separate variables each of length 100 chars .
    you can refer to the following code:-
                CALL FUNCTION 'RKD_WORD_WRAP'
                      EXPORTING
                          textline                  =  v_text
                        DELIMITER                 = ' '
                          outputlen                 = 156
                      TABLES
                          out_lines                 =  i_long_text
                      EXCEPTIONS
                          outputlen_too_large       = 1
                          OTHERS                    = 2.
    Plz reward points if useful.
    Thanks
    Rahul

  • Load excel file value to graph problem(about x-axis value)

    Hello,everyone,I have this problem.
    When I load the excel file which I saved before,the waveform came out normally,but the x-axis of graph waveform was not shown the number I want,it shown the number based on the no.of samples.
    What I want is plot the x-axis value based on the rate(pts/s).For this case,rate is 50prs/s,so after calculation...0.02s per reading.totally is 20 seconds.I tried to use XY-Graph,but didn't solve out.
    Jerry
    LV 7.1
    Attachments:
    delete 0 array.vi ‏14 KB
    test3.txt ‏20 KB
    Create Waveform Graph1.vi ‏275 KB

    is it always 0.02s per reading or did you get this figure from some calculation?? in anyway, you just connect that value (the constant 0.02 or calculated amount) to a Property Node... you link the Property Node to Waveform Graph 2... under property choose X-Scale -> Offset and Multiplier -> Multiplier...
    i'm not sure if this is the best method but hope it helps... i've tried it on your code and it works...
    Best Regards,
    JQ
    LV 8.0 user...

  • Excel file load customization

    Hello!
    Using flat files format FDM 9.3.1 has a possibility to customize format or set a logic, say multiply amount on 100 or skip some lines.
    But I can't see how can I do same thing using loading from excel files, becoz in this case I don't define a format anywhere, FDM just takes fields from cell range.
    Is it possible?
    Thank you!

    Hi SSILeaner,
    The maximum number of columns is limited to 255 when we importing an .xls format Excel 2003 file. This limitation doesn’t exist when we deal with .xlsx format Exce file. For an .xls file, we usually save it as a .csv file or save it as a .xlsx file through
    Office 2010 and then do the ETL. Based on your description, the 200 files are all .xls files. In this condition, I don’t think there is an easy way to load the data to the database table. Maybe you can try some third party SSIS component/task.
    Here is a reference in which Pat Phelan did a good summary regarding this topic:
    http://www.dbforums.com/microsoft-sql-server/1658530-ssis-excel-more-400-columns.html
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • PO creation from Excel file

    Hi,
    is it possible to create a PO up-loading an Excel file (in the file I have material code, description, quantity, price, etc...).
    Thanks
    Fabio

    Hi,
    It is possible to upload PO data directly from excel. In my case, I am using PO BAPI to upload open POs and uploading data from excel file.
    At the selection of screen, just call the function;
    CALL FUNCTION 'WS_FILENAME_GET'        " To get the flat file to SAP
       EXPORTING
         def_filename           = '*'
         mask                   = '.xls'
    Take help of ABAPer to do this.

  • LSMW Errors for Excel file upload

    Hi all,
    We've loaded an Excel file with 20,000+ records into SAP using LSMW and a background run. However, the LSMW returned errors for about 2,000 of those records and seems to have processed the other 18,000. Questions as follows:
    1. Is there a way to extract the 2000 records into another Excel file?
    2. If so, how can I isolate the 2000 records so that I can reload them with correct information?  I do not want to have to go through each record one by one to find them.
    3. How can I identify what the problem was for a record that produced an error?
    Thanks in advance. Points will be awarded for helpful answers.

    u have used LSMW which will normally create a Session which will be executed using SM35 in background mode...Goto the session and click on errors...the errors are been shown up..U can correct there itself or else prepare another one with correct data and do a lsmw once again.

  • Load table to file

    I did the following to create a csv file :
    1) I created a EXCEL_FILE Data Server for the FILE technology
    2) I created a EXCEL_FILE Physical Schema to declare the directory where the files are stored
    3) I created a EXCEL_FILE Logical Schema
    4) I associated the logical and physical for a context
    5) I created a model based on a File Technology and a data store
    6) I try to create an interface with a table source datastore and a File target datastore. ODI maps the two datastore with the IKM SQL Control Append and when I run the interface, it fails.
    ==> Can anyone explain to me how to load data to a file with ODI, please?
    ==> Why can't I get the IKM SQL to File Append
    Thanks a lot

    For a csv file, define it as in the File Technology.
    Then in the Data Model, define the parameters of how
    it it set up (headers, separators etc)
    hen you will be able to use SQL to File append.
    Don't forget to use a staging area different to
    target, as the file technology is not capable of
    hosting the staging tables (if any)Thanks for your answer.
    ==>> I don't knom how to set the headers parameters.
    I used another RKM and LKM to load my excel file and it worked.

Maybe you are looking for

  • New to JSTL: jsp variable translated literally within the custom tag

    I have a basic custom tag that simply processes greeting. Neither of the below scenarios works and I am trying to understand why <% String name = (String)request.getParameter( "name" ) %> <custom:greeting name="<%= name %>"/> <% pageContext.setAttrib

  • Itunes music library is not showing all my music

    I have a random problem with iTunes and I hope someone can help. I have just under 1500 tracks on my macbook, all stored in the iTunes library folder where they should be. However, when I open iTunes, it says it cannot find the original file for load

  • BAPI/Function Module for tx PR05(Travel Expense Manager)

    Hi All, I am searching for BAPI/Function Module for tx PR05(Travel Expense Manager). Thanks.

  • Calling All Apple techies or computer wizards or software wizards

    i am curently running WEBROOT  ... before i re-subscribe i wish to know what in all honesty is thee single best in your opinoin and  most reliable computer software for protection agains viruses/threats/trojans/maware/spyware..i would love love love

  • Wbadmin and the -authsysvol switch

    hello everyone when i run wbadmin with the -authsysvol switch to do a system state restore of a 2008 domain controller once restarted netlogon and sysvol are not shared. dsa.msc wont start and everything is a bit of a mess. if i then go in and change