Read multiple excel sheets using dataset...

Hello Experts,
I've searched the forums and I cannot find any suitable threads for regarding my question. Anyway, I wanto to read and .XLS file residing in the application server using the DATASET commands.However, I am having a shortdump saying "An exception with the type CX_SY_CONVERSION_CODEPAGE".

Continue.......
IF iref_error->has_failed = 'X'.
    CALL METHOD iref_error->raise_message
      EXPORTING
        type = 'I'.
    LEAVE LIST-PROCESSING.
  ENDIF.
  CALL METHOD iref_document->release_document
*  EXPORTING
*    no_flush = ' '
     IMPORTING
       error    = iref_error
*    retcode  =
  IF iref_error->has_failed = 'X'.
    CALL METHOD iref_error->raise_message
      EXPORTING
        type = 'I'.
    LEAVE LIST-PROCESSING.
  ENDIF.
*&      Form  SUB_FILE_F4
*       F4 help for file path
FORM sub_file_f4 .
  DATA:
  l_desktop       TYPE string,
  l_i_files       TYPE filetable,
  l_wa_files      TYPE file_table,
  l_rcode         TYPE int4.
* Finding desktop
  CALL METHOD cl_gui_frontend_services=>get_desktop_directory
    CHANGING
      desktop_directory    = l_desktop
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4.
  IF sy-subrc <> 0.
    MESSAGE e001(00) WITH
        'Desktop not found'.
  ENDIF.
* Update View
  CALL METHOD cl_gui_cfw=>update_view
    EXCEPTIONS
      cntl_system_error = 1
      cntl_error        = 2
      OTHERS            = 3.
  CALL METHOD cl_gui_frontend_services=>file_open_dialog
     EXPORTING
       window_title            = 'Select Excel file'
       default_extension       = '.xls'
*      default_filename        =
       file_filter             = '.xls'
*      with_encoding           =
       initial_directory       = l_desktop
*      multiselection          =
    CHANGING
      file_table              = l_i_files
      rc                      = l_rcode
*     user_action             =
*     file_encoding           =
    EXCEPTIONS
      file_open_dialog_failed = 1
      cntl_error              = 2
      error_no_gui            = 3
      not_supported_by_gui    = 4
      OTHERS                  = 5
  IF sy-subrc <> 0.
    MESSAGE e001(00) WITH 'Error while opening file'.
  ENDIF.
  READ TABLE l_i_files INDEX 1 INTO l_wa_files.
  IF sy-subrc = 0.
    p_file = l_wa_files-filename.
  ELSE.
    MESSAGE e001(00) WITH 'Error while opening file'.
  ENDIF.

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.

  • How to read/write Excel sheets using java

    Hello,
    I have downloaded poi-2.5.1-all-bin and it has
    poi-2.5.1-final-20040804 , poi-contrib-2.5.1-final-20040804, poi-scratchpad-2.5.1-final-20040804 jar Files
    i am unable to configure POI which i have downloaded, when i do
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    it gives error while compilation saying cannot find Sheet class, Workbook class
    should i use ant to build it or which jar file path should i specify in the classpath, because i have downloaded the POI package on to my desktop and included the specified the entire path of all the jar files in the classpath but still the same problem.
    Please guide me.

    dvrsandeep wrote:
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    it gives error while compilation saying cannot find Sheet class, Workbook class
    Either it isn't in your class path or you are using the wrong names. Simple as that.
    Just as a possibility since you didn't import a "Sheet" class but rather a "HSSFSheet" that certainly suggests something is wrong.

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

  • Can we create Multi Tabbed excel Sheet using Crystal Reports 2008

    Hi,
      We want to create a Crystal Report which will export the output as multiple Tab's ( we can use sub reports).  Can we create a Multi Tabbed excel Sheet using Crystal Reports 2008 ( not  Crystal reports Basic 2008). Please share any information/links on how to do that.
    Also if it is not supported please let us know which version supports it.
    Thanks,
    Vasu

    At least one of the 3rd-party Crystal Reports Desktop Scheduling tools listed at: http://www.kenhamady.com/bookmarks.html provides that functionality.  It allows you to burst a single report so that each Group at level 1 becomes a separate tab.  You can control the tab names (and tab colors) via fields/formulas inside the report.
    You can also automate the process of exporting to (and also replacing or appending to) specified tabs inside existing workbooks.

  • Is it possible to create Excel Sheet using OLE automation in App server

    Hi,
       Is it possible to create Excel Sheet using OLE automation in Application server(Open Dataset)
    Thanks in advance...

    Unless your application server is on Windows OS, or it is connected to a Windows server by RFC. What is the requirement exactly, I don't understand?

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • Read an excel sheet and selected two columns like A and C will plot as a XY Graph (X as a A column and Y as a C column)

    hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take  too much delay
    Attachments:
    CSV File to XY GRAPH 13.lvproj ‏9 KB

    shambhulinga a écrit :
    hi sir i am read excel sheet using labview ,but unable to plot the selected colomns,so its needfull ,please find any body to sollution to the problem .i i already did some part ,it is take  too much delay
    First, you are not reading an Excel sheet but a text file (a csv file is a text file). From the listing of the function used (from the lvproj file) you are using the Read From Spreadsheet function, this function will return a 2D array. Use the Index Array function to extract the x and y value columns. Bundle them (using the Bundle function) and wire the output to your XY-Graph.
    Ben64

  • Generating Excell Sheet using Reports 9i

    Hello,
    I wanna know how can I do to generate one excell sheet using reports, without
    use the option that4s generate text file using tab. I wanna know if someone have
    example codes, or library4s.
    Thanks,
    Paulo Sergio

    Here are some notes we created from the demo below. This works great for generating true formated excel output in 9i Reports using 9ias Rel2.
    Notes from
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    Output to Excel with Oracle9i Report
    1.     Create an Excel template for the report. It should contain generic information such as title, logo and column headers
    2.     Cretae a sample line of data in the spreadsheet
    3.     Save the Excel spreadsheet as a Web page. File | Save As Web Page
    4.     Open the Web page you just created in Reports Builder
    5.     Double-click on Web Source node to display the HTML code for the Excel spreadsheet
    6.     Note how Excel generated HTML and XML code for the spreadsheet you created. Reports Builder also adds its own JSP tags
    7.     Add the Data Source An SQL Query
    8.     Modify the Web Source. Now that youve written the query, you can modify the Web source to tell Reports Builder to display your report in Excel.
    9.     Click on the Web Source icon in the toolbar.
    10.     To force the browser to open MS Excel it is necessary to change the HTTP Content Type to a specific MIME Type:
    application/vnd.ms-excel
         Insert the following line immediately before the <rw:report id=report> tag
              <%@ page contentType=application/vnd.ms-excel %>
         (This is a standard JSP directive to set a MIME Type (Content Type) )
    11.     To respect Excel format, you should delete the blank lines above the <html> tag.
    12.     Now, use Oracle 9i Reports JSP tags to add the data retrieved by your SQL Query to the report.
    13.     Search for the sample line of data you added to your Excel spreadsheet
    14.     Each line is saved as an HTML Table Row tag ( <tr> ).
    15.     Each column is mapped as an HTML Table Data tag ( <td> ).
    16.     Using Reports JSP Tags, add a Reports repeating frame tag to loop around the Data Model group.
    17.     To help, show the Object navigator next to the Web Source Window. All group information is now visible in the Object Navigator
    18.     Enclose the sample line of code in the Web source with the Reports9i JSP repeating tag.
    Use from menu Insert | Repeating Frame at beginning of sample
    Move the closing repeating tag after the </tr> tag.
    Start of the repeating tag would be
    <rw:foreach id=foreach src=>
    Ending of the repeating frame would be
    </rw:foreach>
    19.     In the opening of the repeating tag (<for each>), add the name of the group the tags enclose. JSP custom tags require a unique identifier.
    For example: <rw:foreach id=gEmpNoId src=G_EMPNO>
    20.     Now, map the cells of the Excel spreadsheet to the corresponding field from your data model.
    Select on the data value. From menu select Insert | Field. The source of the tag is the name of the field in the query.
    21.     Repeat the operation for each field of the report. Note: do not forget to specify a unique identifier for each field.
    22.     The code now contains a repeating frame. You have also mapped each cell in the Excel spreadsheet to the corresponding field in the data model
    23.     Save the report as a Reports JSP. You can test the report using the Run Web Layout icon in the toolbar
    24.     The execution of a Web Layout report from Reports Builder creates a temporary HTML file and launches the browser. The browser does not launch Excel because the document is saved as an HTML file. To launch Excel from the browser you need to test it from Reports Server.
    25.     In order to have the report appear inside Excel, you need to execute it with the Reports Server under OC4J. To do this you need to:
    First, start an OC4J instance from Oracle 9iDS see How to Execute Reports Services from Oracle 9iDS on OTN. Then, copy the JSP to a directory. For example: $IDS_HOME/reports/j2ee/reports_ids/web/test
    26.     Enter the URL to execute the jsp. The JSP is executed from an OC4J instance.
    http://reports9iTestServer:8888/reports/test/ListOfEmployees.jsp?userid=scott/tiger@ora901
    27. The browser launches Microsoft Excel and displays the data from your report.

  • 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

  • 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

  • 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

  • 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

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

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

Maybe you are looking for

  • GL accounts with no postings are appearing in Trial Balance

    Hi Experts, When the Trial balance is run by selecting the below parameters in 'Trial Balance Report Selection Criteria': 1. 'Hide Accounts with No postings' 2. 'OB from Start of Company Activity' The G\L Accounts having no postings in the posting da

  • How to Save a Fillable Form?

    Hi guys, I've searched and read other posts on this same quesiton, but I've gotten no luck. I open the form in Acrobat X Pro and save as > reader extended > enable additonal features. I then open the new enabled copy, fill some fields out, and then s

  • DReamweaver MX 2004 Nav Bar

    As you will see from this question, I am a newbie at website construction. I am working on developing a new site using Dreamweaver MX 2004. I have included a navigation bar, which seems to work OK except for the "Down" mode. "Up", "over" and "Over wh

  • Auto Deployment versus Hot Deployment

    Hi, Can anyone one please tell me what the real difference is between auto deployment versus hot deployment in WLS 8.1 SP4 as I am confused after reading the documentation. Can they both be individually enabled or disabled? Can I just disable Auto de

  • Find issue with -exec

    Hi, I have a strange issue (since loading the 10.8.5 seed?). When entering something like find . -exec grep something {} \; -print find complaints with find: -exec: no terminating ";" or "+" which is strange since I ever used it this way and always w