Loading Multiple excel sheets in to different tables in a DB

Hi All,
I have problem in loading multiple excel sheets data in to according to that excelsheets tables in a DB.
All the excel sheets are in a folder,from that folder i have to  acces all excel sheets.
For this i am unsing script task and one dataflow task.
But the error is coming in script task i am not able to put the path in the script..
Is this the correct way to do like this? Or any other way?
Can u please tell me the solution for this..Thanks in advance who are responding to this mail...
Maruthi..

Hi Vipin,
Here you go with this requirement
How to Load Multiple Sheets From Multiple Excel Files to Different Tables in SSIS Package?
ttps://www.youtube.com/watch?v=1WXKpkwjhX8&feature=youtu.be
I have other videos as well where you want to load all the sheets from file/s to same table 
https://www.youtube.com/watch?v=F3sYO-S9icc&feature=youtu.be
Check out the last links on below links all related to Excel
http://sqlage.blogspot.com/search/label/SSIS%20Videos
How to Create Excel file with Date-time on Each Package Execution in SSIS Package?
How to Load Multiple Sheets to a SQL Server Table in SSIS Package?
How to Load Data Excel File to SQL Server Table and Solve Data Conversion Issues?
How to Load Multiple Sheets From Multiple Excel Files to Different Tables in SSIS Package?
How to Load Data to Pre-Formatted Excel Sheet (Excel Report) in SSIS Package?
All the best!
http://sqlage.blogspot.com/

Similar Messages

  • SSIS Package to load multiple excel sheets using foreach loop container

    I am creating a SSIS package which is accessing an excel file and then using a Foreach loop container to load each tab to sql server. However when I try to configure the Excel source, I get the following message
    "The argument system_comobject cannot be converted into parameter type. Additional Information - Object must implement iconvertible (mscorlib)"
    Any help to resolve would be much appreciated.
    thanks
    Scott

    If the title is only using column D and the rest of the columns are empty on sheet1/row1
    AND
    if only sheet1 as headers,
    THEN you can try something like the following
    do NOT select row 1 as header or anything.
    In your foreachloop > dataflow, you will start with EXCEL connection then Conditional Split inside which you will define one case for which expression should be like If column D has value like "Title expression" && Column A == "Column A Header
    name" THEN yay or nay. You might want to look into
    FINDSTRING function to assist with this (if you choose to use FINDSTRING, you are looking for !isNull for this case..If it finds the string you are looking for, it will pass an int value (title + header) if it doesn't find the string, it will pass
    NULL (data)) or you can say If Column A, B, C,E,F,G...is NULL and D is NOT NULL && Column A = Column A Header string, then Case 1 else default.
    The default output would be the real data.
    So when sheet 1 is processing, you will have Case 1 output with 2 rows (title + header) and Default output with the rest of the rows (real data).
    For other sheets, you will have Case 1 output with 0 rows (no title + header) and Default output with the data rows.
    The above sln assumes that the data in each sheet is similar in datatypes and length perspective, you have defined input/output datatypes properly, and etc.

  • Download to multiple excel sheets in the backgraoud

    Hi,
    I am trying to download data into multiple excel sheets in the background. I was able to create comma delimited csv file in the server, which can be opened as excel file. This is good when it does not have more that one worksheets.
    I have three internal table and to send these internal tables in different worksheets in the same excel file.
    Is it possible to have multiple sheets excel file from the csv file?

    Check the following thread !!
    Re: Downloading data into excel
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • How to uplaod multiple excel sheets in a program

    Hi gurus,
    Can anyone suggest me
    how to upload multiple excel sheets in program.( not in OOPS)
    my excel sheets has 5 sheets like sheet1, sheet2, sheet3 ....like this..
    Thanks & Regards
    kalyan.

    swc_container it_event_container.                       
    swc_create_container it_event_container.                 
    CALL FUNCTION 'SWW_WI_CONTAINER_READ'
                EXPORTING
                  wi_id                    = wd_id
                TABLES
                  wi_container             = it_event_container
                EXCEPTIONS
                  container_does_not_exist = 1
                  read_failed              = 2
                  OTHERS                   = 3.
    if sy-subrc = 0.
    READ TABLE it_event_container WITH KEY element = 'name of your workflow container element'.
                IF sy-subrc = 0.
                  w_variable= it_event_container-value.
                ENDIF.
    endif.
    Regards
    Kedar

  • Error in importing multiple excel sheets to SQL Server

    I have a package which imports multiple excel sheets to SQL server using a For each Container. However I am getting the following error message "Excel Source failed validation and returns validation status "VS-NEEDSNEWMETADATA".
    Can you please advise me of the steps to potentially resolve this issue ?
    Many thanks
    Scott

    Hi Scott,
    Based on your scenario, you need to implement dynamic columns mapping which is not natively supported by managed source/destination adapters. To achieve dynamic columns mapping, we need to make use of Script Component to parse the input columns and dynamically
    map them to the destination columns.
    References:
    http://munishbansal.wordpress.com/2009/06/09/dynamic-columns-mapping-%E2%80%93-script-component-as-destination-ssis/ 
    http://blog.quasarinc.com/ssis/best-solution-to-load-dynamically-change-csv-file-in-ssis-etl-package/ 
    http://stackoverflow.com/questions/13836874/script-task-in-dft-doesnt-get-excecuted 
    Regards,
    Mike Yin
    TechNet Community Support

  • Uploading  Excel sheet  data into internal table

    Hi All,
    I want to upload Excel file data into internal table. My problem is that my excel file  having more than one sheets. I want to upload  the data of particula Excel sheet..
    Please suggest me how can I upload particulat Excel sheet data .
    Thanks and regards
    Praveen

    check this link
    Uploading multiple excel sheets
    You can check Satish's answer in the above link
    Re: uploading data from excel sheets through BDC's into sap system
    <b>Award points if found helpful</b>

  • Uploading Data From Excel Sheet to SAP Database Tables

    Dear Friends,
    We are having an Excel Sheet with 90 different columns. Now we want only 2 of the columns to be uploaded in the database tables. So, Plz tell me which function module will be suitable for this. And plz help me with the code also.
    Thanks,
    Nishant Jain

    Hi Nishu,
    A sample for the same..
    data it_excel like table of ALSMEX_TABLINE with header line.
    here we retrieve only 2 cols directly..
    now itab will contain only 2 cols of all rows seperated by comma ..
    data str(1000).
    data itab like table of str with  header line.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = 'C:sample1.xls'
        i_begin_col                   = 1
        i_begin_row                   = 1
        i_end_col                     = 2
        i_end_row                     = 100
      tables
        intern                        =  it_excel
      LOOP AT it_excel.
        AT NEW row.
          CLEAR itab.
        ENDAT.
        IF itab IS INITIAL.
          MOVE it_excel-value TO itab.
        ELSE.
          CONCATENATE itab ',' it_excel-value INTO itab.
        ENDIF.
        AT END OF row.
          APPEND itab.
        ENDAT.
      ENDLOOP.
    regards
    satesh

  • Export in multiple excel sheets

    Hi,
    I am using crystal XI and need to export in multiple excel sheets from crystal. How can I do that, please help me.
    Thanks,
    Sagarika.

    One of the 3rd-party Crystal Reports desktop schedulers listed at http://kenhamady.com/bookmarks.html allows you to burst a report so that each group level 1 becomes a separate excel worksheet in a single workbook.  It also allows you to export a report to a worksheet inside an existing workbook.

  • How to spool data into multiple Excel sheet if result is more then 65k rows

    Hi all,
    Wann spool data into multiple excel sheet bocz my resultant no of rows are more then 65k.
    Thanks to all in advance.....

    many choices
    1) migrate to a newer version of Excel
    2) split the files after spooling
    for instance with split
    split -l65000 file.txtor with perl, java, vb or what-so-ever
    3) do more than one report by using rownum
    spool f1
    select empno,ename  from (select rownum r,empno,ename from emp order by empno) where r<6 ;
    spool off
    spool f2
    select empno,ename  from (select * from (select rownum r,empno,ename from emp order by empno) where r<11) where r>5 ;
    spool off
    spool f3
    select empno,ename  from (select rownum r,empno,ename from emp order by empno) where r>10 ;
    spool off

  • Adding Multiple excel sheets

    Hi Experts,
    How i want to add multiple excel sheet in Xcelsius using liveoffice in single canvas.Hope i will expect good from you
    Regards,
    surigs

    Hi Surigs,
    Could you clarify what exactly you need? Do you mean adding multiple sheet? If yes, you can insert multiple sheet in the excel and add live office document.
    Thanks,
    Amit

  • Export to Multiple Excel Sheets

    I would like to be able to export a report (or analysis) to multiple excel sheets.
    I have 2 options, 'Answers' and 'BI Publisher'. Ideally I would like to use answers, but will use Publisher if necessary.
    Is there an easy way to export reports to multiple excel sheets?

    Hi jitapong,
    When a Web Intelligence document is exported to a Microsoft Excel Workbook, the export is handled by the Web Intelligence report engine. Excel is not required to be installed on the machine to execute the export. So, regardless of whether Excel 2003 , Excel 2007, or no Excel is installed, the export is performed using the parameters built into the report engine. This export is done in the Excel 97-2003 format.
    A limitation of pre-2007 Excel is the inability to create a worksheet greater than 65,535 rows long. Excel 2007 overcomes that inability thus allowing users to create worksheets of much greater length.
    Resolution:
    Web Intelligence 3.1 versions overcome the 65,000 row limitation by exporting the document to multiple worksheets within the Excel Workbook. Each worksheet will be 65,535 rows long. For example, if a query returns 150,000 rows of data the resultant export to Microsoft Excel would produce a single workbook with 3 worksheets. 2 worksheets of 65,535 rows and 1 worksheet of 18,930 rows. This export is compatable with Excel 2003 and 2007.
    Regards,
    Chirag

  • 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 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

  • Generate Forms Output into multiple Excel Sheets

    Hi,
    I have a Forms 5.0 application which I am currently web-enabling. The application output is in Microsoft Excel. The output can span multiple sheets depending upon the parameters selected by the user. I am using text_io package to generate a html file with links and anchors for different sheets. Is it possible to generate multiple sheets directly in Excel using a text file.

    Thank you for your answer!
    But I think this is not the solution for my problem.
    I try to explain my problem again. I have a web template with filter, analyse table and infofield. The infofield contains the selected filter values. There is also a button for export into excel. In WAD 7.0 you have only to set several parameters for the export command  and the export to excel works. However all web items will be transfered into the first excel sheet among one another.
    Is it possible to export one web item into the first excel-sheet and the second web item into the second excel-sheet of the same excel workbook?
    Best Regards,
    Julia

  • Uploading multiple excel sheets

    Dear All,
    We are having 4 different excel sheets where data is stored regarding the quantity of laptops, desktops, printers & xerox machines. This data is to be loaded into the SAP tables with Co Code & BA Code as primary key which is there available in excel sheets.
    Plz help me in code to upload all the 4 files in SAP tables based on a combination of CO Code & BA Code.
    The selection screen will have 4 fields to specify the path of all the 4 excel sheets & all the fields are obligatory.
    Thanks & Reg,
    Nishant

    Hi Satesh,
    Thanks very much for your prompt reply.
    I am attaching the code herewith, please guide me where to use FORM & PERFORM to upload the other 3 excel sheets of the same format.
    REport nis1234.
    TABLES: bseg,
            zfi_is_qty.
    DATA:
            t_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE,
            l_nodata  TYPE c,
            l_excelfile(128) TYPE c.             " filename to be passed to excel file
    DATA: BEGIN OF t_type,
            bukrs LIKE bseg-bukrs,
            gsber LIKE bseg-gsber,
            COUNT TYPE I,
          END OF t_type.
    data: l_charlen1 type i,
          l_charlen2 type i.
    DATA: t_type2 LIKE t_type OCCURS 0 WITH HEADER LINE.
    DATA:  l_end_row TYPE i,
           l_endrow1 TYPE i,
           charlen type c.
    DATA l_count TYPE I.
    DATA : q_count TYPE i value 1.
    PARAMETER :
               p_endrow TYPE i OBLIGATORY,
                 p_file  TYPE rlgrap-filename OBLIGATORY.
    ****clearing the contents of database table before uploading a new file everytime
    DELETE FROM ZFI_IS_QTY.
    *****selection-screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          field_name = p_file
        CHANGING
          file_name  = p_file.
    START-OF-SELECTION.
      l_excelfile = p_file.
    l_endrow1 = p_endrow.
    p_endrow = p_endrow + 1.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = l_excelfile
          i_begin_col             = 5
          i_begin_row             = 2
          i_end_col               = 6
         i_end_row              = p_endrow
          i_end_row               = 4000
        TABLES
          intern                  = t_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        MESSAGE i010(zn) WITH 'Error in upload Please check the upload file'.
      ENDIF.
    DESCRIBE TABLE T_EXCEL LINES L_ENDROW1.
    L_ENDROW1 = L_ENDROW1 / 2.
      DO.
        LOOP AT t_excel WHERE row = q_count.
          IF t_excel-col = 1.
            t_type2-gsber = t_excel-value.
          ELSEIF t_excel-col = 2.
            t_type2-bukrs = t_excel-value.
      ENDIF.
        ENDLOOP.
        l_charlen1 = strlen( t_type2-bukrs ).
        l_charlen2 = strlen( t_type2-gsber ).
        if ( t_type2-bukrs <> ' ' and t_type2-gsber <> ' ' ).
           if ( l_charlen1 = 4 and l_charlen2 = 4 ).
            APPEND t_type2. CLEAR t_type2.
           endif.
        endif.
        q_count = q_count + 1.
        IF q_count > l_endrow1.
          EXIT.
        ENDIF.
      ENDDO.
      SORT T_TYPE2 BY BUKRS GSBER.
    *****uploading data from internal table into database table
    LOOP AT T_TYPE2.
    MOVE-CORRESPONDING T_TYPE2 TO T_TYPE.
    L_COUNT = L_COUNT + 1.
    AT END OF GSBER.
      AT END OF BUKRS.
    write:/  t_type-BUKRS,
              t_type-GSBER,
              L_COUNT.
    zfi_is_qty-COMPANY_CODE = t_type-bukrs.
    zfi_is_qty-BAREA = t_type-gsber.
    zfi_is_qty-DT = l_count.
    insert zfi_is_qty.
      CLEAR L_COUNT.
      ENDAT.
    ENDAT.
    ENDLOOP.
    ************to read the data from the database table.
    data: itab like zfi_is_qty occurs 0 with header line.
    select * from zfi_is_qty into corresponding fields of table itab.
    ULINE.
    loop at itab.
      WRITE:/ ITAB-COMPANY_CODE,
              ITAB-BAREA,
              ITAB-DT.
    Endloop.
    Thanks in advance,
    nishu

Maybe you are looking for