From sap to excel file with different sheets?

can  i upload   an internal table  from  SAP to single Excel file with different sheets for example like : sheet1, sheet2, sheet3.......sheet10. , but need to upload data from sap to excel worksheets ie. from multiple named tabs in Excel. Is this possible, and if so, please can you help and advise me how?
thanks
venkat.
Edited by: Matt on Feb 16, 2009 2:15 PM  Removed excessive question marks...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Hi venkat,
Yes indeed it is possible to write data from internal table to different excel sheets. Check out SAP's Microsoft OLE functionality.Search on SDN for OLE . Following are some links
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sample%252bprogram%252bto%252bopen%252bexcel%252bsheet%252busing%252bole
You can also check out FM ALSM_EXCEL_TO_INTERNAL_TABLE to check how to read different worksheets.
Using the above two resources you can create a program that can upload data to multiple worksheets in the same workbook.
Also see this link
Creating Excel with More than one page
Edited by: aditya aghor on Feb 16, 2009 1:57 PM
Edited by: aditya aghor on Feb 16, 2009 2:02 PM

Similar Messages

  • Need to generate excel file with different sheets

    Hi,
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files
    and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    I'm not able to realize how Oracle will help in the problem. You may probably want to look at some [.net forums|http://www.google.com.sg/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS280&q=.net+forums&btnG=Google+Search&meta=lr%3D] about this.
    Cheers
    Sarma.

  • Need to generate the excel file with diffrent sheets using utl_file package

    Hi,
    Sorry for previous message in which I had missed the usage of " UTL_FILE " package
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
    " UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    Hello 10866107,
    at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
    Regards
    Marcus

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • Downloaded file from SAP to excel 2007(*.xlsx, *.xlsm)  - unable to open

    Hi All,
    I am downloading a data from SAP to excel(*.xlsx) format. I am able to conver/download the file in *.xlsx format, but if try to open the downloaded excel file, it gives teh error message 'Excel cannot open the file 'filename.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'. with a OK button. When I press the OK button, no data is displayed.
    So kindly let me know how to download the file from SAP to *.xlsx format without any errors.
    Note: I am able to download the data in *.xls format without any erros.
    Thanks in advance,
    Regards,
    Vijay

    Hi,
    You are probably not being able to open the file of .XLSX format because you do not have Microsoft Office 2007 installed on your system. You might be having a lower version of Microsoft Office. e.g. 2003.
    What you can do is, before opening the .XLSX file directly on a system which does not have Microsoft Office 2007, you can convert it into .XLS format and then open the same.
    See the below code.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_COPY
      EXPORTING
        SOURCE               = 'C:\Users\Danish\Desktop\test1.xlsx'
        DESTINATION          = 'C:\Users\Danish\Desktop\test2.xls'
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        WRONG_PARAMETER      = 3
        DISK_FULL            = 4
        ACCESS_DENIED        = 5
        FILE_NOT_FOUND       = 6
        DESTINATION_EXISTS   = 7
        UNKNOWN_ERROR        = 8
        PATH_NOT_FOUND       = 9
        DISK_WRITE_PROTECT   = 10
        DRIVE_NOT_READY      = 11
        NOT_SUPPORTED_BY_GUI = 12
        OTHERS               = 13.
    IF SY-SUBRC NE 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Danish

  • How to auto insert a number array with size of 20 into a named excel file with the positon is from A1 TO A20?i use lv6.1

    can you give me a example vi for it ?thanks a lot!
    how to auto insert a number array with size of 20 into a named excel file  with the positon is from A1 TO A20?i use lv6.1

    You don't need us to give you an example, as the example already comes with LV. Go to Help>>Find Examples and search for "excel". You will find an example called "write table to XL". You should note that the example doesn't do that exactly, because it writes a 2D array from 2 to N.
    You can modify the example by using only one for loop (instead of nested loops) with a 1D array or by going into the Set Cell Value and modifying it to accept a second cell value for the Cell2 terminal and wiring in a 1D array instead of the single string. If you do modify it, be sure to save it under a different name, so you don't overwrite the original.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • Creating pdf-file from multiple files with different orientation

    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?

    lophelia wrote:
    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
    First I've underline a Phrase in your Question did you mean underlying A4-format?
    Are both PDF Files created with A4-Format? If yes then:
    Did you shift orientation to Portriat Format for the item(s) that you need, such as a Chart or an excel Document? If so:
    Then when the documents are meged  They should print correctly.

  • How do I merge multiple Excel files with more than one tab in each file using PowerQuery?

    Hello
    I have 12 Excel (.xlsx) files and each file has three identically named and ordered tabs in them. 
    I know how to merge multiple Excel files in a folder using M (those guides are all over the web) but how do I merge multiple Excel files with multiple (yet identically named and ordered) tabs? Surely it is possible? I just don't know how to do it in M.
    Cheers
    James

    What Laurence says is correct, and probably the best thing to do when the sheets have differing structures. Here is an alternate approach that works well when the sheets all have the same structure.
    When you first open the Excel file from Power Query, you can see its structure in the navigator at the right-hand-side of the screen. If you select the root (which is the filename itself) and click Edit, you'll see all the tabs in the sheet as a single table.
    You can now do filtering based on the Name, Item and Kind values. When you've reduced the set of things down to the sheets you want, select the Data column and say "Remove Other Columns". If the sheets don't have any header rows, you can just click the expand
    icon in the header and you'll be done.
    Otherwise, if the sheets have headers or if some other kind of sheet-level transformation is required against each sheet before doing a merge, you'll have to write some M code manually. In the following example, each sheet has a header row consisting of
    two columns: Foo and Bar. So the only step I need to perform before merging is to promote the first row into a header. This is done via the Table.TransformColumns operation.
    let
        Source = Excel.Workbook(File.Contents("C:\Users\CurtH\Desktop\Test1.xlsx")),
        RemovedOtherColumns = Table.SelectColumns(Source,{"Data"}),
        PromotedHeaders = Table.TransformColumns(RemovedOtherColumns,{{"Data", each Table.PromoteHeaders(_)}}),
        ExpandData = Table.ExpandTableColumn(PromotedHeaders, "Data", {"Foo", "Bar"}, {"Data.Foo", "Data.Bar"})
    in
        ExpandData

  • Extract data from Oracle in excel file

    Hi,
    I have a requirement where in I need to extract data from Oracle in excel file and the excel worksheet name should be "Data".
    for eg. excel file name "AR Data_DDMMYY" and excel worksheet name "Data"
    I have used the UTL_FILE API to extract the tab delimited data which can be opened in excel but it is not exactly an excel file as the worksheet name is same as the file name.
    I tried using utl_file.fcopy and frename.
    Is there any way to do this using PLSQL?
    select * from v$version;
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionSample Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    --select * from dba_directories
    begin
    f := utl_file.fopen(dir, file_name, 'W');
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    for i in c
    loop
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    end loop;
    utl_file.fclose(f);
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    end;Thanks
    Imran

    Imran Soudagar wrote:
    Hi,
    I was able to generate the excel 2007 file with the data using the package from below link;
    http://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
    but the requirement is to generate excel 2003 file.
    I tried changing the .xlsx to .xls and it gives a note while opening the file "The file you are trying to open, abc.xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"Then you have three options:
    1) stop using anton's package and find another one that supports the old and deprecated version of Excel 2003
    2) write your own package to produce an Excel file.
    3) Upgrade your version of Excel to a recent version
    I tried the programs from other links on the forum but I am still getting this message. The client does not want this message to be displayed as the excel file works as an input to another system.
    Can anyone help me with the issue?
    Also, is it true that the programatically generated excel file is actually an xml file which is renamed to .xls and hence it shows the message while opening such files?Yes, Excel supports several different formats for it's files. By default, if you save an XLS files from Excel, it writes it out in a Microsoft proprietary binary format, which you would be hard pushed to replicate easily from PL/SQL. Excel also has the ability to save it's files as XML format, which is more readable and easier to produce programatically, whilst still allowing you to have multiple sheets, formulas and formatting included in it. That's the format that most people who need formatting and multiple sheets opt for when programatically generating their data as excel workbooks. (There's also an SLYK format that people used to use before that, but it's not as flexible)
    If you want to write your own, the easiest thing to do is to start with a blank workbook in Excel, and put in your basic requirements e.g. a couple of named sheets, and some data in different formats (number, date, text etc.) and different formatting options etc. Save that file in XML format from Excel and then open up the file using notepad/wordpad to look at the structure. There'll be a whole load of redundant rubbish Microsoft put in there, but you should be able to figure out the basic structure of XML required to give you what you want.

  • Problem in opening excel file in different window

    hi
    i want to open excel file in different window it open in same window properly on the bases of condition but when i try to open in different with window.open( )
    it give error that file has already used or path not exist OR requisted site either unavailable
    how can i rectified

    Hi.
    I am too facing the same problem. I am using Jakarta Poi to display my resultset in an excel sheet directly(and not into a jsp)
    The browser opens a window showing Open Save Cancel. If i click and save the excel sheet and then open, it opens. But clicking on Open directly doesnt open the excel sheet. Rather it gives the same error
    The file name or path name does not exist.
    The file you are trying to open is being used by another progrtam . close the document in other program and try again
    The name of the work book your tring to save is the same as name of another document that is readonly .try saving workbook with different name
    Can somebody please help me fix this problem, since its an urgent requirement. Mail me at [email protected]
    Thanks
    Hitesh

  • Download records to EXCEL file with  Leading Zero's for numbers

    Hi All,
    I am able to download the data to EXCEL file on the presentation server.
    There are few fields (Plant,SalesOrder Number ..with Leading Zero's) in the record.
    These values are downloaded with out Leading Zero's to excel( EX: 0000004122 as 4122).
    Please help me to download the data to EXCEL file with leading zero's.
    Thanks and Regards,
    KC

    >
    Krishna Chaitanya  G wrote:
    > The excel file which is to be downloaded..will be used by some other program..to upload the values to the sap.
    > It matters there....
    > KC
    HI KC,
    then no need to download the zeros,
    after uploading, loop at that uploaded internal table and use CONVERSION_EXIT_APLHA_INPUT and pass the vbeln(without zeros) to this FM, it will return the value with added zeros.
    hope this solves your query
    a small example
    Loop at itab into is.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = is-vbeln "(  this is without zeros)
    IMPORTING
    OUTPUT = is-vbeln. "( this is with leading zeros)
    modify itab from is.
    endloop.
    Edited by: Soumyaprakash Mishra on Oct 6, 2009 2:16 AM

  • Any way to export table to excel file with leading 0s?

    I have to export about 50 excel files from different tables.  Some tables contain leading 0s in the columns.  If I use bcp to export to xls file, the leading 0s will be missing.  If bcp to csv or txt file, there will be no issue at all.  But I have to export to xls file in order to let client update that xls file and reload to tables again.
    Is there any other ways to do this task?
    Thanks in advance.

    Ok,  I played with it and fixed it on mine to work.
    Here is what you do.  Create a blank Excel file in Excel with a single header row with your column names in it, and then set the datatypes for each column in Excel to match your export type.  For the below, create an Excel file and in column A1, put "Name" and change the column to Type Text.  Then in B1 type Date and set it to type Date, then save the file as c:\Test.xls.  Then close the file in Excel.
    In SSMS execute the following:
    Code Snippet
    INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0',
    'Excel 8.0;Database=C:\test.xls;HDR=YES',
    'SELECT Name, Date FROM [Sheet1$]')
    SELECT [Name], GETDATE() FROM msdb.dbo.sysjobs
    GO
     It worked perfectly in my environment.  Don't bother with BCP, just create a formated Excel File with a header row with your output column names and then save it.

  • Issue in Data from DSO to DSO Target with different Key

    Hello All,
    I am having Issue in Data from DSO to DSO Target with different Key
    Source DSO has Employee + Wage + Post numner as key and Target has Employee + Wage Type as key.
    DSO semantic grouping works like Group By clause in sql, is my understanding right ?
    Also if someone can explain this with a small example, it would be great.
    Many Thanks
    Krishna

    Dear, as explained earlier your issue has nothing to do with semantic grouping .
    Semantic grouping is only usefull when you have written a routine in the transformation for calculations and in error handling .
    Please go through this blog which explains very clearly the use of semantic grouping .
    http://scn.sap.com/community/data-warehousing/netweaver-bw/blog/2013/06/16/semantic-groups-in-dtp
    Now coming to your above question
    DSO 1
    Employee WageTyp Amount
    100          aa          200
    200          aa          200
    100          bb          400
    100          cc          300
    If we have semantic group as Employee .   If we have Employee as key of the target DSO and update type as summation .
    then target DSO will have
    Emp                Amount
    100                 700
    200                 200
    In this case Wage type will be the last record arriving from the data package . If the record 100  cc  300 is arrivng last then wage type will be cc .
    2) Case 2
    DSO 1
    Employee WageTyp Amount
    100          aa          200
    200          aa          200
    100          bb          400
    100          aa          300
    if we do Semantic grouping with Emp and Wage Type   If we have Employee and wage type as key of the target DSO and update type as summation .
    then target DSO will have
    Emp     Wage      Amount
    100          aa          500
    200          aa          200
    100          bb          400
    Hope this helps .

  • Excel file with auto-filter

    I have a excel file with auto-filters (sort filters) i'm
    trying to incorporate that into my web page via dreamweaver. what
    is the best method on doing so? converting the file to any other
    format will loose the auto-filter feature i have setup on the excel
    file. any ideas would be appreciated.

    Nor do I... Now! ;-)
    BTW interesting error message. I've never seen that.
    Walt
    "Ken Binney" <[email protected]> wrote
    in message
    news:g8kig8$2tm$[email protected]..
    > Thanks for posting that Walt, but I have no problems
    reaching the site
    > from New York.
    >
    >
    >
    > "Walt F. Schaefer" <[email protected]> wrote
    in message
    > news:g8kco3$o97$[email protected]..
    >> link delivers this: This Account Has Exceeded Its
    CPU Quota
    >>
    >> Whoops!
    >>
    >> --
    >>
    >> Walt
    >>
    >>
    >> "Ken Binney"
    <[email protected]> wrote in message
    >> news:g8k8vp$j7e$[email protected]..
    >>> You might also consider converting it to a table
    and use javascript for
    >>> sorting
    >>> Here's a free script
    >>>
    >>>
    http://www.mingyi.org/other/ts_demo.html
    >>>
    >>> "bronxbabie1"
    <[email protected]> wrote in message
    >>> news:g8jsro$269$[email protected]..
    >>>>I have a excel file with auto-filters (sort
    filters) i'm trying to
    >>>>incorporate
    >>>> that into my web page via dreamweaver. what
    is the best method on doing
    >>>> so?
    >>>> converting the file to any other format will
    loose the auto-filter
    >>>> feature i
    >>>> have setup on the excel file. any ideas
    would be appreciated.
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

  • Oracle WebADI: How to Download the WebADI Excel File with Parameter

    Hello Friends,
    How to Download the Oracle WebADI Excel File with Parameter??
    For Ex: How to download the Employees for Specific Department from Oracle WebADI.
    And After to change the specific changes on Employee Data to Upload.
    Thanks in Advance.

    Hi Team.
    Any Advise on it!!

Maybe you are looking for

  • SAP Note regarding manually updating SQL tables

    Hi all, I know that under no circumstances should customers update their SQL tables using any method expect DTW or via SAP. Is there an SAP Note on this subject.  I cannot find one anywhere? Thanks Greig

  • Failed

    Dear Expert, We failed to export document using ms. excel icon in SAP B1 in all PCs or SBO clients. We must create database folder in every PCs before printing. After creating database folder, we must assign the folder in the path tab of general sett

  • Failover_mode=NONE not working?

    I've tried using failover_mode=NONE for all resources in some resource groups that I don't want to fail over without manual intervention. However, if the node running the resource groups are rebooted or taken down, they still fail over to the other n

  • After upgrade of Weblogic 8.1 to 9.2 web application fails to function

    Hi, After spending days and days together to get the upgrade to complete and finally build the web application, when i now try to run the web application, the admin (note i am runing under weblogic workshop domain) server gives the following warnings

  • Providing POP

    I'm probably posting this in the wrong category but I don't see any other category that best fits. I have a question about providing my Proof of Purchase to Apple for registration purpose of my iPod Touch. On the actual receipt states it was sold to