Reg : export data from ALV to excel file

Hi All,
I am using REUSE_ALV_GRID_DISPLAY to display the output. I have total 73 columns getting displayed in output but when i export the data to the excel file using (ctrlshiftF9) I am getting only first 43 columns in the first row and from 44th column on wards the data is populated in the 1st  column of second row.
Please let me know is there any particular setting by which I can get all the 73 columns in a single row.
Thanks in advance.
VIJAY

Hi vijay,
You can try setting your line width to 255 in your abap program.
Otherwise,  you can try an alternative:
1. Put a customize button on the ALV toolbar.
2. Go to se41 to create th buttons
2. do i_callback_program in ALV function. or SET PF_STATUS
3. Then in sy-ucomm, use 'GUI_DOWNLOAD' to xls.
Hope this helps you.
Thanks
William Wilstroth
Edited by: william wilstroth on Dec 18, 2007 5:06 PM

Similar Messages

  • Exporting data from ALV to Excel...

    Hi All,
      I am trying to export report to Excel with ALV Excel option on status bar, it works fine for 3 months data with 80 columns in the report. But when I run the report for one year data then report displays data fine in R/3 but when I download to Excel it's empty. The eroor is Dataset can't be processed by Excel.
    Then I tried with option Download ->Local file->spreadsheet. which doesn't save headers in it. And colums coming in two lines But user wants all columns with header if i do with this option it's not pulling headers.
      Please let me know if anybody had the same issue and came up with solution. That would be really great!
    Thank you.

    Hi Satya,
    Thanks for your reply.
    There will be around 60,000 records in the report with 80 to 100 columns. ALV report looks fine in R/3 but while downloading to Excel only it's saying ' Dataset can't be complete'. For 3,000 to 4,000 records it works fine.
            Is this because of huge data?

  • Exporting data from ALV Report...

    Dear All,
    While I am exporting data from ALV report to any other Format (Excel, Txt, HTML) it only export the data of last column, but the heading is comming properly and also the column heading is displaying properly.
    So how to rectify it. (the report is Object Oriented).
    Regards,
    Dahrmesh

    Hi Davabap,
    Refer this sample program "BCALV_GRID_VERIFY" . I hope it is problem with structure mismatching.
    Otherwise can you paste your code ?
    Regards,
    Vicky
    PS: Award points if helpful

  • How to download data from spool to excel file

    Hi,
    I have requirement like....i need to download data from spool to excel file.
    Please let me know the process how to download...
    <removed by moderator>
    <removed by moderator>
    Thanks,
    Khasimsa
    Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
    locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

    Hi try this way..
    *FM called that returns the Spool Request Number data into and internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool                     "Spool Request Number
          first_line           = 1
        TABLES
          buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          OTHERS               = 8.
    *To convert the spool data into excel format
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_spool_xls               "Internal table having spool data
          objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data
    "call GUI down Load by passing  it_xls_spool
    Prabhudas

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • Exporting Data from Essbase to Excel

    Hi All,
    We are using classic planning application developed in Hyperion 11.1.2.2.
    Is there any way that we can export data from Essbase to Excel (Please note that i don't want to do it on server machine where essbase is installed, instead i want it on any client PC which is accessing Essbase)

    there are many ways you can do that, Through Excel Add-in,SmartView functions etc different.
    It depends on the requirement , if you mean to say who Essbase Data then someone else should be able to answer this.
    Thanks
    Amith

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

  • Leading Zeros Missing - When exporting data from ALV grid display to Excel

    Hi,
    Am exporting the data from ALV GRID DISPLAY to Excel sheet using standard toolbar icon 'Local file'
    the leading zeros displayed in the ALV output is missing in the EXCEL sheet.
    (eg)  in ALV o/p - 0029. 
            in Excel - Only 29 is appearing.
    As per the requiement i have to show the leading zeros in excel also.
    Pls help on this issue.
    Thanks in advance..

    Hi ,
      Please set the property  :
      wa_fieldcat-lzero = 'X' .
    when you are creating field catalog for display alv data .
    your prob will solved .
    Regards ,
    Nilesh Jain

  • Issue to export data from sql to excel

    I have MS SQL 2008 Developer version and visual studio 2008. I'm using SSIS Import and Export Wizard on the VS2008 to create a simple package to export data from a table using a sql query to excel file (.xlsx), but I got the following
    error messages:
    [Destination - Query [37]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
    [Destination - Query [37]] Error: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
    [SSIS.Pipeline] Error: component "Destination - Query" (37) failed the pre-execute phase and returned error code 0xC0202025.
    The SQL query is
    SELECT [BusinessEntityID]
          ,[PersonType]
          ,[NameStyle]
          ,[Title]
          ,[FirstName]
          ,[MiddleName]
          ,[LastName]
      FROM [AdventureWorks2008].[Person].[Person]
    Any help will be appreciated. Thanks.
    A Fan of SSIS, SSRS and SSAS

    Or another way is to save the package created by Export Import wizard, open it in BIDS and add a Derived column task before the Excel destination to do explicit casting of the columns to your required unicode datatypes.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Export data from block to excel.

    Hi
    Does anybody know how I can export data from oracle forms to an excel worksheet. I need to provide a direct interface for a user where he fetches the data into the block and by just click a button the data from the block should go to an excel sheet.
    Thanks in advance
    -Samsam

    Something along the following lines should help you in you are Client/Server. If you're on the Web then make sure you have WebUtil set up and add "CLIENT_" to all the OLE2 calls.
    PROCEDURE P_EXCEL IS
         application ole2.Obj_Type;
         workbooks ole2.Obj_Type;
         workbook ole2.Obj_Type;
         worksheets ole2.Obj_Type;
         worksheet ole2.Obj_Type;
         args ole2.List_Type;
         cell ole2.Obj_Type;
         j INTEGER;
         k INTEGER;
         file_name_cl VARCHAR2(32767);
         item_prompt VARCHAR2(32767);
    user_cancel EXCEPTION;
    BEGIN
    -- open the java save file dialogue box
    file_name_cl := GET_FILE_NAME('H:\', 'file_name.xls', 'XLS Files (*.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
    file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
    IF file_name_cl IS NULL THEN
    RAISE user_cancel;
    END IF;
    application := ole2.create_obj('Excel.Application');
    workbooks := ole2.Get_Obj_Property(application, 'Workbooks');
    workbook := ole2.Invoke_Obj(workbooks, 'Add');
    worksheets := ole2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := ole2.Invoke_Obj(worksheets, 'Add');
    go_block('EXPORT_BLOCK');
    first_record;
    j:=1; /* Represents row number */
    k:=1; /* Represemts column number */
    /* Add the column headings using item prompts */
         FOR k IN 1..10 /* Block has 10 visible columns */
    LOOP
    item_prompt := get_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM, prompt_text);
    args:=ole2.create_arglist;
    ole2.add_arg(args, j);
    ole2.add_arg(args, k);
    cell:=ole2.get_obj_property(worksheet, 'Cells', args);
    ole2.destroy_arglist(args);
    ole2.set_property(cell, 'Value', item_prompt);
    ole2.release_obj(cell);
    next_item;
    END LOOP;
    j:=j+1; /* Add to rowcount so that data won't overwrite column headings! */
    LOOP
    /* Add in all the data */
    FOR k IN 1..10 /* Block has 10 visible columns */
    LOOP
    IF NOT name_in(:system.cursor_item) IS NULL THEN
    args:=ole2.create_arglist;
    ole2.add_arg(args, j);
    ole2.add_arg(args, k);
    cell:=ole2.get_obj_property(worksheet, 'Cells', args);
    ole2.destroy_arglist(args);
    ole2.set_property(cell, 'Value', name_in(:system.cursor_item));
    ole2.release_obj(cell);
    END IF;
    next_item;
    END LOOP;
    j:=j+1;
    IF :system.last_record = 'TRUE' THEN
         exit;
    ELSE
         next_record;
    END IF;
    END LOOP;
         ole2.Release_Obj(worksheet);
         ole2.Release_Obj(worksheets);
         /* Save the Excel file created */
         args := ole2.Create_Arglist;
         ole2.Add_Arg(args, file_name_cl);
         ole2.Invoke(workbook, 'SaveAs', args);
         ole2.Destroy_Arglist(args);
         /* release workbook */
         ole2.Release_Obj(workbook);
         ole2.Release_Obj(workbooks);
         /* Release application */
         ole2.Invoke(application, 'Quit');
         ole2.Release_Obj(application);
    EXCEPTION
    WHEN user_cancel THEN
         RAISE;
    END;

  • Exporting Data from Forms to Excel

    Hi,
    How can I export the data from Forms to Excel like which Export function in the Oracle Applications.
    Thank you,
    Voon

    Hello,
    By using dde package you can export the data from Form to Excel. Here is the sample code which i have used. you can write this code in the when_button_pressed trigger.
    declare
    appl_name varchar2(255);
    channel_id pls_integer;
    application_id pls_integer;
    x number;
    y number;
    V_TIME VARCHAR2(30);
    begin
    if :global.application_id is not null then
    message('Application already open');
    else
    appl_name := 'c:\program files\microsoft office\office\excel.exe';
    :global.application_id := dde.app_begin(appl_name,dde.app_mode_normal);
    end if;
    if :global.channel_id is not null then
    message('Communication channel already established.');
    elsif :global.application_id is null then
    message('Application must be launched first.');
    else
    :global.channel_id := dde.initiate('excel','book1');
    end if;
    DDE.POKE(:global.channel_id,'R1C1','Col1 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C2','Col2 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C3','Col3 Heading',DDE.CF_TEXT,1000);
    FIRST_RECORD;
    X := No of Records;
    for y in 2..x
    loop
    launch_excel is a program unit--
    launch_excel(y,:global.channel_id,:block.item1,:block.item2,::block.item3);
    next_record;
    end loop;
    FIRST_RECORD;
    EXCEPTION
    WHEN DDE.DDE_APP_FAILURE THEN
    MESSAGE('Could not launch application for DDE operations.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DDE_INIT_FAILED THEN
    MESSAGE('Could not initialize DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
    MESSAGE('Could not establish DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHERS THEN
    MESSAGE('Error: '&#0124; &#0124;TO_CHAR(SQLCODE)&#0124; &#0124;' '&#0124; &#0124;SQLERRM);
    RAISE FORM_TRIGGER_FAILURE;
    END;
    LAUNCH_EXCEL
    PROCEDURE LAUNCH_EXCEL(
    y in number,
    channel_id pls_integer,
    param1 varchar2,
    param2 VARCHAR2,
    param3 varchar2) IS
    v_rowno varchar2(20) := 'R'&#0124; &#0124;y;
    BEGIN
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C1',col1,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C2',col2,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C3',col3,dde.cf_text,2000);
    EXCEPTION
    when others then
    message('Error --'&#0124; &#0124;sqlcode&#0124; &#0124;sqlerrm);
    message('Error --'&#0124; &#0124;sqlcode&#0124; &#0124;sqlerrm);
    raise form_trigger_failure;
    END;
    null

  • Export data from MSA to Excel?

    Can we export daat from MSA to Excel? When we search for the business partners, is there a way to download the results to excel?
    Thanks!

    Hi,
    Yes you can bring the data to Excel. One you a Business Partner Search,the results flow down to the list tile.
    1)Select one of the grid rows and Right Click on where the Arrow points.
    2) A small drop down comes up.choose the option "Generate Report".
    3) This opens up the"InstantReport" screen. Choose "MicrosoftExcel" in the Instant Report To Combo.
    4)Select the grid columns that you want and add them using the buttons present there.
    5)Then click on the button "Generate".
    6)The data flows down to an Excel sheet.
    Regards,
    Abishek

  • BI 4.0 sp 6 service name to export data from webi to excel

    Hi there,
    I'm using BI 4.0 SP6 and I was just curious to find out which servers/services are invoked while exporting data from WebI report to Excel?
    Thanks in advance.
    Regards,
    samique

    Check below section in the Admin guide for this information.
    Architecture\Process Workflows

  • How to export data from report to excel using report 10g

    Hi,
    usnig report 10g, can we export the data from report to excel.
    Regards
    Randhir

    Hi,
    have a look at metalink note 209770.1: Getting Reports Ouput to MS Excel - Techniques and References
    Regards
    Rainer

  • Procedure/batch file to export data from sql to excel(predefined path)

    Hi,
    I have countries, sites, states tables (total 3) in database (i have user id and password to connect to this database).
    every week i need to extract data from these tables into excel files and i need to save those in shared drive for team use.
    Currently i am connecting to database every time running sql query and manually exporting that latest data to excel and saving that as excel files in (G:\team\common\) folder with specific name.
    output format should be : excel (.xls)
    file names should - countries.xls,sites.xls,states.xls
    server name : ap21
    output location : G:\team\common\ ( G is shared drive).
    i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.
    could you please guide me what is the option and also help me with technical stuff to do this task.

    Hello,
    output format should be : excel (.xls)Do you really want to create .xls files? This is not easy to do because it is a proprietary (MS) binary format. You should consider other formats like .csv or .xlsx. Follow the link in the previous answer how to generate them.
    file names should ...The name of the files does not matter, you are free to name them as you like.
    server name : ap21
    output location : G:\team\common\ ( G is shared drive).You can write the file generated in the database only to directories that are accessible from the db as Oracle Directories. You could mount the shared drive to the db server, but it might be better to write the output to a server directory and then transfer them to the shared drive with OS-copy command or FTP.
    i heard that we could create batch file to do this task and also we could use oracle procedure to do this task. but not sure which one is the best option.I would use Oracle Scheduler to execute a PL/SQL procedure to generate the files and then a OS-batch file to transfer them. You can use the Scheduler to execute the batch file too, see {message:id=3895983}.
    Regards
    Marcus

Maybe you are looking for

  • Material Master Data Loading Error

    Hi All, I am loading master data for material. i got the following error. 1. 0material_attr :     Record 1 :0MATERIAL : Data record 1 ('000000000000010220 '): Version '000000000000010220 ' is not   valid     Process :   If this message appears during

  • Problem with HP-DeskJet 1120c

    HP-DeskJet 1120c driver has a specific billbord option which caused the priter to split the image on two or more pages, even if we turn off this function. This thing appear only on Developer 6 under Windows 95 Best regards Victor null

  • Sound in a game!

    Hi guys! I'm writing a game for Sony Ericsson K700. And i have a problem with a sound. Also i'm working with MIDP 2.0. My problem is to play 2 sounds in a game. When i play first sound, it play good, then is playing second sound and i have exception.

  • Audio level is not the same

    hi guys my problem is that i have a 1h project with various materiales....some of them have high audio volume and some low is there a way to make them all almost the same level (higest audio peak shouldnt pass the -6db threshold) without the need to

  • Restart error messages

    Hi All,                While processing the files, some messages getting the system error status. these messages needs to be resend is there any possibility to resend the error messages? Thanks Sagar