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"

Similar Messages

  • Download to multiple excel sheets

    Hi all,
    How can we download data to different sheets in one excel using 2 internal tables.
    Thanks,
    Rajesh.

    Hi thanks for the reply,
    i almost solved the problem, except i need to save the excel file in a particular directory.
    what is the procedure. the following code dosen't do that.
    this is my code.
    data: begin of itab occurs 0,
          posnr like vbap-posnr,
          vbeln like vbak-vbeln,
          end of itab.
    select vbeln
           posnr
           from vbap
           up to 20 rows
           into corresponding fields of table itab.
    data : V_COL   LIKE SY-TABIX.     " column number of the cell
    data : v_row  like sy-tabix.
    data : zmeng like vbap-zmeng.
    data : posnr1 like vbap-posnr.
    data : count(3) type n.
    DATA: gs_excel TYPE ole2_object ,
          H_CELL  TYPE OLE2_OBJECT,
    gs_wbooklist TYPE ole2_object ,
    gs_application TYPE ole2_object ,
    gs_wbook TYPE ole2_object ,
    gs_activesheet TYPE ole2_object ,
    gs_sheets TYPE ole2_object ,
    gs_newsheet TYPE ole2_object .
    DATA gv_sheet_name(20) TYPE c .
    DATA gv_outer_index LIKE sy-index .
    DATA gv_intex(2) TYPE c .
    DATA gv_line_cntr TYPE i . "line counter
    *PARAMETERS: p_sheets TYPE i .
    data : p_sheets TYPE i .
    START-OF-SELECTION .
    sort itab by posnr.
    loop at itab to 1.
    posnr1 = itab-posnr.
    endloop.
    count = 1.
    loop at itab.
    at new posnr.
    p_sheets = p_sheets + 1.
    endat.
    endloop.
    DO p_sheets TIMES .
    *--Forming sheet name
    gv_intex = sy-index .
    gv_outer_index = sy-index .
    CONCATENATE 'Excel Sheet #' gv_intex INTO gv_sheet_name .
    *--For the first loop, Excel is initiated and one new sheet is added
    IF sy-index = 1 .
    CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
    SET PROPERTY OF gs_excel 'Visible' = 1 .
    GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooklist .
    GET PROPERTY OF gs_wbooklist 'Application' = gs_application .
    SET PROPERTY OF gs_application 'SheetsInNewWorkbook' = 1 .
    CALL METHOD OF gs_wbooklist 'Add' = gs_wbook .
    GET PROPERTY OF gs_application 'ActiveSheet' = gs_activesheet .
    SET PROPERTY OF gs_activesheet 'Name' = gv_sheet_name .
    *--For the rest of loops, other sheets are added
    ELSE .
    GET PROPERTY OF gs_wbook 'Sheets' = gs_sheets .
    CALL METHOD OF gs_sheets 'Add' = gs_newsheet .
    SET PROPERTY OF gs_newsheet 'Name' = gv_sheet_name .
    ENDIF .
    gv_line_cntr = 1 . "line counter
    sort itab by posnr.
      LOOP AT ITAB where posnr = posnr1.
        V_COL = v_col + 1.
        PERFORM FILL_CELL USING v_col 1 ITAB-vbeln.
        PERFORM FILL_CELL USING v_col 2 ITAB-posnr.
        zmeng = zmeng + ITAB-posnr.
        at end of posnr.
          v_col = v_col + 1.
          PERFORM FILL_CELL USING v_col 2 zmeng.
          clear v_row.
          clear zmeng.
        endat.
      ENDLOOP.
      delete itab where posnr = posnr1.
      loop at itab to 1.
        posnr1 = itab-posnr.
      endloop.
    clear v_col.
    enddo.
    *--Deallocating memory
    FREE: gs_excel, gs_wbooklist, gs_application, gs_wbook,
    gs_activesheet,gs_sheets, gs_newsheet.
    FORM FILL_CELL USING  ROW COL VAL.
      CALL METHOD OF gs_EXCEL 'Cells' = H_CELL
                     EXPORTING #1 = ROW #2 = COL.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_CELL 'Value' = VAL .
      PERFORM ERR_HDL.
    ENDFORM.                    " FILL_CELL
    FORM ERR_HDL.
      IF SY-SUBRC <> 0.
        WRITE: / 'Error in processing Excel File:'.
        STOP.
      ENDIF.
    ENDFORM.
    please send your suggestions,
    rajesh.

  • Multiple Excel Sheets of the same Workbook

    Hi
    if anyone know where is exactly the problem here,in order to inser each row of the table in a different worksheet of the same workbook
    by the way the moment i try to use a loop with excel get worksheet,to link the indexation with the worksheet index i get error and it doesn't work
    or i have to use this one with some loop with "open new worksheet.vi"
    This VI is "write table to XL" from find examples
    i really need help to solve this
    thanks
    Attachments:
    best one.vi ‏35 KB

    i figured a way to do it,i have now a problem in programmation in order to make each row in a different Excel Sheet,if anyone could figure what i have to change
    Attachments:
    Write Data Into New Worksheet of Existing Workbook.vi ‏30 KB

  • Download data from internal table to excel sheet from the background

    Hello Experts,
    I have written a code where the data is stored in the internal table . Now when i run this code in the background i want this internal table data to get downloaded in the excel sheet. The function module GUI_DOWNLAOD is not supported in the background. So is there any other function module that can be used or is there any other way to do this
    Thanks in advance

    Hi Aditya,
    I would provide you 2 advice:
    1. save the file on the application server as text file and the fileds in it separated by TAB,you can download the file whenever you want and open it with excel.
    2.generate excel files and send it to the email address whatever you specify in the selection-screen.
    Thanks,
    Sam

  • How to download background o/p in multiple excel sheet?

    hi every body,
                                I am sandipan. I am very new in this field. My  requirement is  a report is showing total  sales report. Fields are kunag, vbeln, name1, netwr and many more fields are there   and it executing in background schdule . After  executing In background it shows the output  sm37  and i have to download this report in different excel sheet from application tool bar  in  sm37  . report will download according to kunag inr different excel sheet. for example- suppose there are 100 kunag. so there will be 100 excel sheet and the name of the  excel sheet according to customer id  means diff. customer id so different excel sheet . how is it  possible ?  please guide me with your valuable suggestion.
                                                                                    thank you.

    Hi,
    Before posting try to search in SCN next time.
    Go through below link, it may help you.
    [excel_sheets|http://www.sapdev.co.uk/ms/ms_excel.htm]

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

  • Downloading logo in excel sheet from application server

    hi all
    how can i download a logo in excel sheet from the application server(logo is in OAOR tcode) .you can also specify with OOPS concept.
    rewards assured.
    Reagrds
    Swarnali Basu

    hi naresh
    i think there is some miscommunication in case of my question,my requirement is to add a logo in excel sheet from application server,i mean when the user clicks to download the excel sheet the logo should immediately appear in the excel sheet,and it is not a fixed logo it can be anything which appears in applicaton server(on that program).
    as far as excel sheet stanalone is concerned i know to do it and as well as to get the logo  in the application server standalone ,but i cant download the logo in excel sheet from the application server.now does my question make sense ?
    Reagrds
    Swarnali

  • Downloading data in excel sheet

    Hi All,
        I want to download data in excel sheet. My requirment is to use the same excle sheet to fill data.
    The next data should be entered in the column of the excel sheet. Is there a possible to write data in excel sheet at a particular row/column.
       Please let me know if this can be achevied?
    For Ex:
    Data: 10, 20, 30
    Excel sheet:
    10
    20
    30
    Data: 40, 50, 60
    Excel sheet:
    10          40
    20          50
    30          60
    Thanks & Regards,
    Rupali Ray

    Hi,
    This should be possible by OLE concept.
    Have a look at report RSDEMO01
    Regards

  • 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

  • Need to open the excel sheet in the selection screen

    Hi All,
    my requirement is to upload the data from excel sheet but that excel sheet have mutiple tabs and all individual tab have mutiple records inside. I need to open the excel sheet from selection screen and select dynamically any tab and i need to put all the records into internal table of that paricular tab.
    Please suggest how it can be done.
    <removed_by_moderator>
    Thanks,
    Madhu
    Edited by: Julius Bussche on Oct 21, 2008 11:41 AM

    >
    madhu singh wrote:
    > Thanks for reply but this FM is actually transfer the tha data frrom excel sheet to the internal table. which we can use later before that i need to open the excel sheet on the selection screen.
    it depends on which event do you call the FM. If you call in INITIALIZATION (or LOAD-OF-PROGRAM) than the Excel sheet will be uploaded before the selection screen appears at all. The problem with the above FM is that it will upload the actual tabstrip of the sheet, probably not what you want (and definetly no multiple ways). To upload data form Excel from multiple tabs, you need to code it on your own with the help of OLE commands.

  • 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

  • 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

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

  • WAD 7.0 - Export into multiple excel sheets

    Hello all,
    I try to export an infofield (with filter values) and analyse table from WAD to excel. But after export both web items, infofield and analyse table, are in the same excel sheet. How can I export the infofield and analyse table in the different excel sheets?
    I suppose, that the export will be executed on java-stack with java functionality. In WAD I can only define the parameters for the command "EXPORT". Is it possible to enhance this java coding?
    May be, the export to multiple sheets is possible with Web Items  "Javascript" or "Custom Extension" with ABAP-Class?
    Best Regards
    Julia

    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

Maybe you are looking for

  • SAP IQ 16 Hang in the last phase of insert from ASE 15.7 using RLV

    Problem description: When I try to load 73K rows from ASE 15.7 to IQ 16.0 SP3 the IQ server ‘hang’ at the last phase of the insert (merge RLV store to main IQ dbspace). Hang: The server stops responding; stop writing to iqmsg; and, I’m unable to stop

  • CS4 file merging problem

    Hi Everyone, I hope somebody can help me with this one. I have 2 sites each with it's own root folder, each was started as it's own site using it's own the selected root folder. The 2 sites share the same template, with the same spry assets, menu bar

  • Cursors - More number of repeated full table scans

    Hai, If i execute the below mentioned query in sql*plus select distinct cod_acct_no, a.cod_cc_brn, a.cod_prod from account_master a, product_master b where a.prod_no = b.prod_no and b.cod_sc_pkg = var_pi_cod_sc_pkg and cod_acct_stat not in ( 1,5) UNI

  • Lost my referenced masters after update 3.0.1

    Dear all, after the update to 3.01 a few hours ago I have no more access to my referenced masters. When I try to open Photoshop or other plug-ins there is an error message. After having so much trouble with the update from A2 to A3 whilst getting the

  • DO NOT UPDATE IPOD NANO

    the newest updater doees not help at all, if u do not have the remote.