Export datagrid values to Excel

Hi,
Is there any way to export datagrid values to Excel other than saving values to clipboard or using API's??
Thanks,
Shruthi V

Hi,
Thanks a lot. The link was useful.

Similar Messages

  • Export DataGrid into Excel

    Hi All,
       Can anybody share the code to export datagrid into an excel ?
    Thanks,
    Ravisha

    you can send the datagrid rows/values to server side and use some serverside script to create excel.

  • Export from ALV to Excel - problem with numeric values

    hi folks,
    when exporting from alv to excel and we have negative values (and using an u.s.a. setting where . and , are different to r/3) negetive values are not shown correctly in excel.
    when changing in win nt the regional settings to europe one's (e.g. germany) everything works fine.
    any hints welcome,
    kind regards
    oliver

    I guess this has something to do with the excel settings. In the control panel you have regional settings.try some options there. It might work.
    Regards
    Sudhi

  • Unexplained Error while Exporting Datagrid to Excel

    Everything else seems to work ok (e.g. paging, master/detail functions, etc.) but the Export Datagrid to Excel isn't. I get the following:
    ErrorWe Recommend:Refreshing the page.Contacting your Portal administrator if problems persist.Accessing this Portlet at a later time.
    I am exporting it out as an attachment so Excel opens for the user. It works fine outside of the portal. Anyone know what I'm doing wrong?
    Paul

    I'm using the standard Microsoft ASP.NET 1.1 Datagrid control. Here is my routine that gets launched from a LinkButton Control...
    privatevoidExportDataGrid(){Response.Clear();Response.Buffer= true;Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("Content-Disposition", "attachment;filename=Lead_FeedBack.xls");Response.Charset = "";
    this.EnableViewState = false; System.IO.StringWriter oStringWriter = newSystem.IO.StringWriter(); System.Web.UI.HtmlTextWriter oHtmlTextWriter = newSystem.Web.UI.HtmlTextWriter(oStringWriter);
    // Create a DataGrid control and Pass content from first DataGrid to itDataGrid DataGrid2 = newDataGrid();DataGrid2 = DataGrid1;this.RemoveControls(DataGrid2);
    //Lets make it a generic looking spreadsheetDataGrid2.HeaderStyle.BackColor = Color.LightGray;DataGrid2.AlternatingItemStyle.BackColor = Color.White;DataGrid2.PagerStyle.BackColor = Color.LightGray;DataGrid2.HeaderStyle.Font.Bold = true;DataGrid2.RenderControl(oHtmlTextWriter);
    Response.Write(oStringWriter.ToString()); Response.End(); }
    Paul

  • Export a datagrid to an excel using com.as3xls.xls.Sheet class

    I am trying to export a datagrid to an excel in Flex using com.as3xls.xls.Sheet class. But the contents of the cells in the excel are overlapping so I need to wordwrap the cells and also change the width of the cells. How can I do that in flex?

    You can use flexspreadsheet for this purpose.
    The excel file exported from Flexspreadsheet is well formatted and wordwrap supported than as3xls.
    here is a link that can help you.
    Thanks,
    Kanchan | www.infocepts.com

  • Export Cross tab percent values to excel as percent format

    Post Author: mailtovenkats
    CA Forum: Exporting
    Hi,
       when im exporting percent values in cross tab report to excel then excel format cell is not converting as percent and its format as genreral. i want to be excel format as percent.
    Any one help me do to achive this.
    Thanks,
    Venki

    Dear Yuka,
    You may check this thread:
    Re: Incorrect date format in excel reports
    Thanks,
    Gordon

  • Exporting report values with preceeding zeroes in excel

    Hi,
    i'm trying to export a report to excel but the report has values like '0000250000' and excel strips it down to '250000'.
    How do i fix this?
    Thanks
    Deepak

    Hi Jayvee,
                   Without using  Mid() function you can do this.
    Please follow the steps given below.
      (1).  Select the properties of Item Description text box. 
        (2). Change CanShrink to True and CanGrow to False.
        (3). Adjust report width so that it will fit in A4 paper.
        (4) . Save and Deploy the report.
       After exporting to excel, now you can see the full item description.
       Hope this will solve your issue.
    Please click the 'Mark as Answer' button, if this post solves your issue.
    Best Regards,
    Dhanisha

  • Export DataGrid to Excel. (Need Help @_@)

    Hi Guys..
         im newbie flex developer, i just want to ask how im going to export may data to excel??

    http://code.google.com/p/as3xls/

  • Export the Report in Excel format

    Hi,
    How to export the Report in Excel format directly from the SAP to my Desktop.
    Plz. give me the process???
    Thanks

    use this,
    INCLUDE OLE2INCL.
    INCLUDE EXCEL__C.
    AND
             H_EXCEL TYPE OLE2_OBJECT,        " Excel object
              H_MAPL  TYPE OLE2_OBJECT,         " list of workbooks
              H_MAP   TYPE OLE2_OBJECT,          " workbook
              H_ZL    TYPE OLE2_OBJECT,           " cell
              H_F     TYPE OLE2_OBJECT,            " font
              H       TYPE I.
    AND
      PERFORM SUB_GET_DATA.
         'get data here
      PERFORM SUB_POP_DATA.
         'populate data here
    AND
      PERFORM SUB_DISP_EXCEL.
    *&      Form  SUB_DISP_EXCEL
    FORM SUB_DISP_EXCEL.
       START EXCEL
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    SET PROPERTY OF H_EXCEL  'Visible' = 1.    " for printing o/p line by line in excel sheet
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1  1 1   10  'Mat Doc Number'(001) 'R'.
      PERFORM FILL_CELL USING 1  2 1    4  'Item'(002) 'R'.
      PERFORM FILL_CELL USING 1  3 1   10  'Mat Doc Date'(003) 'R'.
      PERFORM FILL_CELL USING 1  4 1   10  'Vendor'(004) 'R'.
      PERFORM FILL_CELL USING 1  5 1   20  'Mat Doc Item amount'(005) 'R'.
      PERFORM FILL_CELL USING 1  6 1   15  'Material price'(006) 'R'.
      PERFORM FILL_CELL USING 1  7 1    4  'Currency'(007) 'R'.
      PERFORM FILL_CELL USING 1  8 1   18  'Material'(008) 'R'.
      PERFORM FILL_CELL USING 1  9 1   30  'Material Desc'(009) 'R'.
      PERFORM FILL_CELL USING 1 10 1   19  'Qty in Unit of Entry'(010) 'R'.
      PERFORM FILL_CELL USING 1 11 1   19  'Qty Received'(011) 'R'.
      PERFORM FILL_CELL USING 1 12 1    4  'Unit of Entry'(012) 'R'.
      PERFORM FILL_CELL USING 1 13 1   20  'Mat Group'(013) 'R'.
      PERFORM FILL_CELL USING 1 14 1   16  'Vendor Invoice'(016) 'C'.
      LOOP AT T_OUT INTO W_OUT.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H  1 0 10 W_OUT-MBLNR 'R'.
        PERFORM FILL_CELL USING H  2 0  4 W_OUT-ZEILE 'R'.
        PERFORM FILL_CELL USING H  3 0 10 W_OUT-BLDAT 'R'.
        PERFORM FILL_CELL USING H  4 0 10 W_OUT-LIFNR 'R'.
        PERFORM FILL_CELL USING H  5 0 20 W_OUT-DMBTR 'R'.
        PERFORM FILL_CELL USING H  6 0 15 W_OUT-NETPR 'R'.
        PERFORM FILL_CELL USING H  7 0  4 W_OUT-WAERS1 'R'.
        PERFORM FILL_CELL USING H  8 0 18 W_OUT-MATNR 'R'.
        PERFORM FILL_CELL USING H  9 0 30 W_OUT-MAKTX 'R'.
        PERFORM FILL_CELL USING H 10 0 19 W_OUT-ERFMG 'R'.
        PERFORM FILL_CELL USING H 11 0 19 W_OUT-WEMNG 'R'.
        PERFORM FILL_CELL USING H 12 0  4 W_OUT-ERFME 'R'.
        PERFORM FILL_CELL USING H 13 0 20 W_OUT-WGBEZ 'R'.
        PERFORM FILL_CELL USING H 14 0 16 W_OUT-XBLNR 'C'.
        CLEAR W_OUT.
      ENDLOOP.
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTIN    G #1 = 2.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
      PERFORM ERR_HDL USING 'Unable to create workbook'.
    add a new workbook
    CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2. "----------can remove-------THIS IS FOR STAY AT LIST
      PERFORM ERR_HDL USING 'Unable to create new workbook'..
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL USING 'Unable to free workbook'.
    ENDFORM.                    " SUB_DISP_EXCEL
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD COL VAL I_HORIZON_ALIGN.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL USING 'set cell object error'.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL USING 'set value  object error'.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL USING 'set font  object error'.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL USING 'set bold  object error'..
      SET PROPERTY OF H_ZL 'ColumnWidth' = COL.
      PERFORM ERR_HDL USING 'set columnwidth object error'.
      IF NOT I_HORIZON_ALIGN IS INITIAL.
      IF I_HORIZON_ALIGN = 'L'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLLEFT.
      ELSEIF I_HORIZON_ALIGN = 'R'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLRIGHT.
      ELSEIF I_HORIZON_ALIGN = 'C'.
      SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLCENTER.
      ENDIF.
      ENDIF.
      PERFORM ERR_HDL USING 'set Alignment object error'.
    ENDFORM.                    "FILL_CELL
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL USING VAL.
      IF SY-SUBRC <> 0.
        WRITE: / VAL.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL

  • OBIEE Report Export from Dashboard to Excel doesn't suppress the columns as

    OBIEE Report Export from Dashboard to Excel doesn't suppress the columns as expected even after the properties are set to Suppress in the report. In Dashboard it is suppressed Properly but in the excel export it is not suppressed and values for the columns are repeated.
    Added the following to the instanceconfig :
    <Download>
    <Export xsi:type="excel">
    <DataValue>UseFormattedValue</DataValue>
    <RepeatRows>false</RepeatRows>
    </Export>
    </Download>
    But then could not restart services.The following error occured :
    Util Logger] Exception occurred:
         Severity:1
         Type:PKN3saw9ExceptionE
         File:saxreader.cpp
         Line:681
         Message:Sax parser returned an exception.
    Message: The prefix 'xsi' has not been mapped to any URI, Entity publicId: /oracle/ofm/instances/instance1/config/OracleBIPresentationServicesComponent/coreapplication_obips1/instanceconfig.xml, Entity systemId: , Line number: 43, Column number: 26
    Edited by: 887111 on Mar 27, 2013 11:23 PM

    Problem solved!!
    <br><br>
    See this part of the query:
    <br><br>
    if :P15_GESTOR_PROPIETARI='-3' then<br>
    w:= w||' AND (("STASVWREPORT_TASQUES"."GES_GES_ID"=:GESTOR ';<br>
    w:= w||'OR "STASVWREPORT_TASQUES"."GES_GES_ID_ESTA_ASSIGNADA"=:GESTOR)';<br>
    w:= w||'OR ("STASVWREPORT_TASQUES"."AGR_***_***_ID"=<FONT color=red>:P15_CANVI_DE_CLUB</FONT> ';
    w:= w||' AND "STASVWREPORT_TASQUES"."PUBLICA"=''S''))';<br>
    end if;<br>
    <br>
    when instead of :P15_CANVI_DE_CLUB I put a value (say ''EE'') it works correctly, finally I created an application item (ASSOCIAT) and when when I change :P15_CANVI_DE_CLUB I set :ASSOCIAT to the same value and the query is based on this application item:
    <br><br>
    if :P15_GESTOR_PROPIETARI='-3' then<br>
    w:= w||' AND (("STASVWREPORT_TASQUES"."GES_GES_ID"=:GESTOR ';<br>
    w:= w||'OR "STASVWREPORT_TASQUES"."GES_GES_ID_ESTA_ASSIGNADA"=:GESTOR)';<br>
    w:= w||'OR ("STASVWREPORT_TASQUES"."AGR_***_***_ID"=<FONT color=red>:ASSOCIAT </FONT>';<br>
    w:= w||' AND "STASVWREPORT_TASQUES"."PUBLICA"=''S''))';<br>
    end if;<br>
    <br>

  • How do I create a series of text frames using values from Excel list?

    First of all, this is the very first script I'm attempting to write from scratch. I'm completely green at scripting, and I've picked up a few snippets from Adobe's ID scripting guide, but nothing has really stuck yet relating to this particular objective.
    My supervisor keeps a master list of ad spaces, with the name of the account, how wide the space is, and how tall the space is, all in an Excel sheet. These spaces can number in the hundreds, and I am stuck manually drawing one rectangle for every space, which takes a very long time.
    I'd like to create/have help creating a script that will take these values and "automagically" draw these spaces in the form of text frames, with the width (in columns) and the height (in inches) defined by the values in the master list, as well as the name of each account appearing in the subsequent text frames.
    The script doesn't necessarily need to be able to pull the values straight from the Excel sheet; I can transfer the values to a support text file if needed, or directly into the script, changing it as I need it. A big thing (if it is not able to pull right from an Excel sheet) is that the number of spaces changes weekly, and so do the accounts, and the width and the height. Accordingly, it would be ideal if the values from the sheet could be changed easily, so as to create a new set of spaces as needed.
    Positioning for each space is not crucial, only height and width. If they all appear on top of each other on the same page, that will be a result for me. The main idea is to not have to draw them all manually, one by one.
    To me, this sounds like a tall order, but hopefully some experienced scripters out there can assist me, as I wish to become experienced as well.
    So, the TL;DR version:
    - Script needs to draw a series of text frames.
    - Text frames dimensions need to be defined by width and height values from Excel sheet.
    - Text frames must have account name as contents (from account names in Excel sheet).
    - Accounts, width and height change every week in the Excel sheet, so must be relatively easy to exchange all of the values.
    - The width values are on the Excel sheet as columns. It would be ideal if the script could convert those numbers into multiples of columns as needed.
    - (Optional) Script can pull values directly from Excel sheet.
    - (Optional) Script can define text frame fill color as gray. (If it works as I think it will, I could just select all the resulting text frames myself and set them all to gray at once... I'm not that lazy )
    Thanks in advance to whomever can assist in any possible way, even if it is just a push in the right direction. This script will save 1-2 hours of tedium every week.

    Sound like the perfect thing for InDesign Scripting.
    I would copy the Excel contents into a text file, to get a format that is easily read from InDesign, and there will automatically be a TAB for each "cell" just using copy/paste.
    Here is a piece of code, that you perhaps could go on with (adding variable to change pages and location on page, and other stuff).
    The readFileLineByLine function, can be easily re-used with any function using "callback". You simply supply the function to it, that you want to be executed for every line of text that is read:
    const COLUMN_WIDTH = 2; // Define the column width in inch
    var pageIndex;
    var textFramesExported; // not implemented.
    // Add a new dokument. Set myDoc to app.activeDocument to use
    // the current document instead of creating a new one.
    var myDoc = app.documents.add();
    // The doSomethingWithTextRow function is called upon for every line of text read.
    readFileLineByLine('c:\\test.txt', doSomethingWithTextRow);
    function doSomethingWithTextRow(row){
        // We expect the text line to be TAB separated (\t = TAB). We get that from just copying the contents of an
        // excel file into a text document.
        var cells = row.split('\t');
        var companyName = cells[0]; // The Company name in the first slot of the array
        var width = COLUMN_WIDTH * cells[1];
        var height = cells[2];
        // Create a new text frame for every row handled
        if (pageIndex==undefined) pageIndex = 0; // Count up when you have exported a number of texts, I leave this for you to do.
        var newTextFrame = myDoc.pages[pageIndex].textFrames.add();
        newTextFrame.contents = companyName;
        // The text frame is created in the top left corner.
        newTextFrame.geometricBounds = [0, 0, height + ' in', width + ' in']; // Top, Left, Bottom, Right
        // You might want to move the textframes to other positions, keeping track of how many you put out per page.
        newTextFrame.move( [10, 10] );
    function readFileLineByLine(path, callbackFn){
        var myFileIn = new File(path);
        if (File.fs == 'Windows'){
            // This was probably added to recognize UTF-8 (even without its start marker?)
            myFileIn.encoding = 'UTF-8';
        myFileIn.open('r');
        var myEncoding = myFileIn.encoding;
        try{
            if (!myFileIn.exists){
                throw('Missing file: ' + myFileIn.fsName)
            var ln = '';
            while(!myFileIn.eof){
                // Read the lines from the file, until an empty line is found [now as a remark].
                ln = myFileIn.readln()
                // if(ln !='' && ln!='\n'){
                   // Call the function supplied as argument
                   callbackFn(ln);
        }catch(e){
            alert(e);
            gCancel = true;
        finally{
            myFileIn.close();
    The file in C:\ in my example was saved as UTF-8 and looks like this (showing hidden characters):
    Message was edited by: Andreas Jansson

  • 500 internal server error while Export wedbdynpro content into Excel.

    Hi Experts,
    my requirement is export webdynpro content into excel sheet, so for this what i have did is
    First step:
    ) created an Extneral library DC
    2) imported the JARs to the libraries folder of the External Library DC project
    3) Right-click on each of the JARs imported to the project and added them to the public part.
    Second step:
    1) Createed a new Reuse Web Dynpro DC
    2) Created a new public part, selecting the "Can be packaged into other build results" option
    3) extrcted the full content (folders and class files) to root folder
    4) Imported the folders and files to the src/packages folder
    5)binded the attributes, created 3 methods and writen the code for those methods.
    Third Step:
    1) created one more EXPORT EXCEL DC
    2) ADDED LIB jar dc and Reuse DC IN used dc's
    3) created usedwebdynpo component and binded attributes to Table VIEW and writen the code for exposing table values.
    After this build and deployed i am getting clasnot found error
    so what i have did now is
    Fourth step:
    1)Created "J2EE Library DC"
    2) Refered "External Library DC" into J2EE Library DC.
    3) Deployed "J2EE Library DC"
    4) Refered this one in my Web Dynpro DC by giving Library Reference.
    now when i deploy and run what happend i am getting
    500 Internal Server Error SAP J2EE Engine/7.01 
    Application error occurred during request processing.
    Details:   com.sap.tc.webdynpro.services.sal.core.DispatcherException: Failed to start deployable object sap.com/export_file_excel_7.
    Exception id: [00215E78C4C0006D00000AD9000E00F00004887F642A32FE]
    Any one can tell what could be the problem.

    Thanks for sharing the solution.

  • Problem in exporting ALV Report to excel sheet

    Hi All,
    I have developed a Report and now facing problem in exporting the same to excel sheet.
    When we click the "Locate File" icon in the report layout, the system will pop up a window with radio buttons. I have opted for 'Spreadsheet'.
    When i save the excel sheet into my desktop, the excel file has all the report headers (Title of each column). But no value is exported.
    There are around 15 columns in the report and the excel sheet shows value of last 2 columns which has some text.
    I have been into ALV report development and developed around 30+ reports in the same fashion.
    What might be the reason behind this issue?
    When i export other reports into excel sheet, everything is perfect without any flaws......
    Kindly help me out......
    Regards
    Pavan

    Hi,
    Here's my suggestion: Install OpenOffice.org and ask SAP to deliver good integration with OpenOffice.org.
    Alternative suggestion: re-install SAP Gui on the PC where the integration is not working. If that does not help, re-install Microsoft Office as well.
    Here's my comment: I think you should ask this question in a different forum, e.g. in the Duet forum. That may not be the correct forum either, but as it is a Microsoft/SAP integration technology forum, someone there may know the solution.
    Regards,
    Raj.

  • Repersentation of #error in HFR while exporting the report in Excel

    Hi All,
    We are working on Hyperion Financial Report 9.3.1 with Essbase as a data source.
    We are replacing the #error with 'NA', which is working fine when we are viewing the FR reports in workspace.
    But when we export this report in Excel, word "NA" is changed by 0 (zero), which is misleading the user.
    How can we stop this conversion (NA to 0)?
    Any suggestion and help will be appreciated.
    Thanks & Regards,
    Mohit Jain

    Hi All,
    Thanks for your answers and support.
    I raised this issue to Oracle support also, I got the following response-
    Hi Mohit,
    I tested the case with the way you offered me. I can reproduce the problem. I think it should be a bug of the product.
    I searched that on ML3. I found a bug which said that. This bug has been fixed in EPM 11.1.1.0.00. I tested that on my EPM 11.1.1.0.00 system. It works fine. The NA value can be exported in excel.
    So would you like to upgrade to EPM 11.1.1.0.00 to fix the issue?
    Hope this information will help others in future.
    Thanks & Regards,
    Mohit Jain

  • Exporting PDF document to Excel.  When I export a PDF document to Excel containing lists of  people the Excel page shows all the names on  one line several inches deep instead of on separate lines which makes editing impossible.  What am I doing wrong?

    Exporting PDF document to Excel.  When I export a PDF document to Excel containing lists of  people the Excel page shows all the names on  one line several inches deep instead of on separate lines which makes editing impossible.  What am I doing wrong?

    Murray is right. Padding (and margins) is added to the width. However, when using percentages, you should never use figures that add up to exactly 100%.
    Browsers need to convert the percentages to pixels. Because pixels must be whole numbers, some percentages are rounded up, which results in the final element dropping down below its neighbours. With percentages, it's much safer to use values that add up to 98% (99% often works, but 98% is safer).

Maybe you are looking for

  • JS: CS3-Change text on master pages

    Hello all, I am new to JS and I really need help. I have spent hours researching, but without much success. I have written code in VB before but I am totally new to JS so please be patient with me. Here is what I want to do. I publish a monthly trade

  • Mac mini with a fire wire external drive

    I have 10 folders with pictures in my fire wire external drive, but mac mini cannot see the pictures in one of the folders. If you click the folder, it shows 0 items. However, if the folder is chosen as a screen saver folder, the pictures show as a s

  • Data Integrator build failure - could not open trace log file

    HI, this is regarding data integrator 11.5.  I have a job that failed trying to run a data flow with the below error.  Its run perfectly fine plenty of times in the past.  It looks like it just couldn't open the trace log file that it had been writin

  • Can I use AI clcock config.vi to set external time base

    DAQ PCI-MIO-16XE-50 board According to NI website, I can use "Alternate Clcok rate spec in AI clock config.vi" to set scan clock using external timebase. Does this method in fact change the DAQ cards Master Timebase? According to NI, I can use RTSI t

  • Shipment process related.

    Hi Gurus.. Can U PLZ explain me in Steps the Shipment process. Info like Pre requisites, Steps n follow on procesess asssociated with Shpment creation. Also let me know id f we need to create a shiment doc only after creation of a del doc or can it b