Export to Excel with colored row

Hi,
I'm developing a alv report in web dynpro. The first  requirement is to put traffic lights based on some criteria. This part has been done.
2nd requirement is to export this alv report into excel sheet. If traffic light of the row is 'RED' then in excel sheet it will be colored 'RED', if row is green excel sheet row will be 'GREEN' etc.
Thanks in advance for providing  me solution of above problem  I'm new to dynpro.
Thanks in advance,
Abhijit.

Hi ,
    If you need cell formatting you must use the Excel XML format. Build a spreadsheet with the features you want and then choose save as XML from within Excel. Then look at the resulting file with a text editor to see how the XML format is built. This is what you need to duplicate in ABAP using Concatenations, the iXML library or XSLTs.
   OR you can go through this link and check if it can help you:
  link : http://www.****************/Tutorials/WebDynproABAP/Excel/Index.htm

Similar Messages

  • Export to excel with formatting was autowrapping text in a cell

    Export to excel with formatting was autowrapping text in a cell without having to check the can grow option.  When the can grow option is checked it does wrap the text however it spans multiple rows, which causes complications when trying to sort. 
    It worked in:
    ProductVersion=10.0.0.533
    ProductName=Crystal Enterprise 10 Embedded
    Doesnt work in:
    Crystal Reports 10.0 Service Pack 6
    After the upgrade the reports did not autowrap, b/c the "can grow" option was not checked.  I believe this was fixed by "ADAPT00305137 Patch ID: 36479914
    Description:
    When users export to Excel 97-2000 with the page-based format, text fields are wrapped, even when the "can grow" feature in the
    Designer is turned off." .   After we turn the option to grow on it does wrap however it spans across multiple rows.  So I guess my question is there a way for it not to span multiple rows when wrapping text?
    Edited by: dforde on Jan 27, 2010 11:12 PM

    I could be wrong, but I believe the export to excel option exports the database values, and the export to HTML exports the values seen in the sheets. If the database values are stored as seconds, the Excel will see them as seconds, and the data will have to be formatted properly in Excel.
    I haven't toyed around with Excel exports that much, but it might be possible to set up a template or macro in excel that would have the proper formatting, and use it when opening the Disco export.

  • Export to Excel with Filter values

    I have implemented Prakash Darji's Exporting tips.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123
    But it very important for us to only allow the user to only export the data which is available on the table currently, basically export to excel WITH filters and not everything which is in the infoprovider.
    does anyone have a way of achieveing this?
    i was thinking of maybe somehow passing filter values in the PCD url
    Something like this?  would this work.....
    pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex.QUERY=ZTESTQUERY&FILTER_IOBJNM=0CALDAY&FILTER_VALUE='01012009'&BI_COMMAND_1BI_COMMAND_TYPE=EXPORT&BI_COMMAND_1-EXPORT_FORMAT=XLS&BI_COMMAND_1-null=

    Hi Apeksha,
    you can achieve this requirement (unless I do not know the detailled requirement) perhaps by using this way of implementation:
    1. Create a new template which contains an info_field which does a data binding to the variable values or the characteristic you want to display. Set the visibility of the top container to "hidden". Add a empty data provider to this template. However be aware that the name for the (empty) data provider must match the name of the data provider within the original template you want to print.
    2. Open your original template and include the template you created in step 1 (Advanced: Web Templates and technical name of the web template created in step 2). Choose the appropriate location (above/below the analysis item).
    3. Check the settings of your export command: do not set a special web item to be printed.
    If you export the template within web the second template should be printed correctly displaying the variable settings chosen in step 2 for the info_field.
    Brgds,
    Marcel

  • Matrix exporting to excel with empty columns, with page break option of "Between each instance of a group" selected.

    I am working with Report Builder 3.0 I am using a matrix to produce grouped data on separate worksheets in excel.
    The select is:
    SELECT ID, Measurement, Value, [Date] FROM Measurements_Report. (please ignore the underscores they are just for formatting) 
    The contents of the Measurements_Report table:
    ID__Measurement__Value__[Date]
    1___Hot_________33_____10/1/2014
    2___Hot_________44_____10/2/2014
    3___Cold_________55_____10/2/2014
    The matrix contains a single row group based on the field "measurement". The Measurement group has the page break option of "Between each instance of a group" selected. 
    There is a column group based on the field "Date". 
    When this is matrix is exported to excel on the first worksheet (Hot) there are three columns as shown below:
    ID__10/1/2014____10/2/2014___10/2/1014
    1___33
    2_______________44
    Notice the last column doesn't have a value.
    On the second worksheet (Cold) there are also three columns as shown below:
    ID__10/1/2014___10/2/2014___10/2/1014
    3__________________________55
    This time notice there is only one row and only a value in the last column.
    I only want the columns with data for that worksheet to show up. How can I remove these empty/duplicate columns? Hopefully there is a simple fix. Thanks ahead of time.

    With the following contents of the Measurements_Report table:
    ID__Measurement__Value__[Date]
    1___Hot_________33______10/1/2014
    2___Hot_________43______10/1/2014
    2___Hot_________44______10/2/2014
    3___Cold________55______10/2/2014
    Returns on the first tab (Hot):
    ID__10/1/2014____10/1/2014____10/2/2014
    1___33
    2_________________43
    2______________________________44
    In the excel worksheet it contains a separate column for each date with a value. Thanks again!
    Why is the same date repeating on multiple columns? Do you've the time part also returned from database?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Export in Excel- always first row blank

    hi,
    if i export in excel file always i am getting first row as blank with line. how can i eliminate this row.

    Hi Kayadhu,
    Generally, if we design a report and the top of report body remain extra blank space, it will result in the extra blank row after export the report to Excel. Please see the screenshot below:
    In your case, please try to reduce the blank space in the report body. If the issue still persists, please post more information about your report design structure to us.
    Regards,
    Bin Long
    Bin Long
    TechNet Community Support

  • Exporting a report with color..

    Hi,
    While exporting to excel, can we export the report as it is with the theme color in the report
    Regards,
    Pa

    Pa,
    Using my export to excel package, you can do that - even choose the colors you want
    to display, if you change the package:
    http://htmldb.oracle.com/pls/otn/f?p=31517:108
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Export to excel with javascript/vbscript or with plsql(html table)

    i have searched for a way to export data from OracleXe to excel without losing formatting .
    So far i have found 2 possible relatively easy ways that i am still researching
    (i do not include the ask tom sylk format way of exporting )
    1 to export the query to a html table, while using stylesheets for formatting
    (using microsoft specific styles)
    2. use of javascript/vbscript to fill an array and write this array to excel with use
    of visual basic for applications in excel.This also provides charting capabilities.
    I am still researching this two ways, and have
    encountered a few obstacles (help would be appreciated)
    1 the first way:
    a. create a button " export to excel"
    b. create the following pl/sql procedure:
    owa_util.mime_header('application/vnd.ms-excel');
    owa_util.http_header_close;
      HTP.PRINT('<html>');
      HTP.PRINT('<head>');
      HTP.PRINT('<meta http-equiv="Content-Type" content="text/html">');
      HTP.PRINT('<title>Title of the HTML File</title>');
      HTP.PRINT('</head>');
      HTP.PRINT('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
      HTP.PRINT('<h1>Heading in the HTML File</h1>');
      HTP.PRINT('<p>Some text in the HTML file.');
      HTP.PRINT('</body>');
      HTP.PRINT('</html>');
    htmldb_application.g_page_text_generated := true;
    htmldb_application.g_unrecoverable_error := true;
    c: run the procedure conditionally based on the button  "export to excel"
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true; is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen.
    To export to excel while retaining data formatting  you have to use microsoft excel
    specific styles(Seedocumentation on the microsoft site)
    2.The second way:
    a create a pl/sql procedure or sql query.
    b use this query to fill a vbscript/javascript array with values
    c write these values to excel with use of vba in excel :
    the obstacle i encountered here was that i dont know how to export the result of a
    query to a visual basic script or javascript array.

    Using approach 1) works fine for me.
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true;
    is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen. Why is this a problem?
    I created the button to export the excel file on page 1 and created your pl/sql procedure on page 2 using an onload process.
    Works fine.
    Other approaches for exporting to excel are:
    http://www.oracle.com/technology/pub/articles/saternos_broadcast.html
    http://htmldb.oracle.com/pls/otn/f?p=18326:54:5685133631021176591::::P54_ID:1962
    ~Dietmar.

  • Hyperion IR 11 -Export to Excel with formatting

    Hi,
    we have problem in exporting pivot sections to excel with the format intact.
    Is there really an option in Hyperion IR 11, to use this as such?
    I have a script that creates excel, by creating a MHTML And converting it to excel.
    But I need to know other options as well.
    Thanks in advance.

    Hi~
    I get the same question.
    I export pivot sections to excel with the format intact, but it did not work.
    When export pivot sections to excel can not with the format intact
    My script below:
    ActiveDocument.Sections["sectionname"].Export('C:\\test.xls',bqExportFormatOfficeMHTML,true,true);
    What is it wrong? Thanks~

  • SSRS 2008 R2 - Missing Data when Exporting to Excel or CSV (Row Count is 500)

    Hey Folks,
    When exporting SSRS 2008 R2 report  to an csv or excel file not all the rows are being exported. Any suggestions on why this is occurring. The number of rows is less then 500 and it seems to be a pretty straight forward export. Any help is
    greatly appreciated.  Inherited this and not sure if this would be configuration issues or something else. It is happening on a number of reports.
    Thanks.

    Hi Humbly,
    According to your description, when you export report into CSV or Excel format, some rows are missing.
    In your scenario, since you are missing data “rows” in your exported file, we are guessing if you have any visibility setting like toggle which hide those records. It’s possible that you have set toggle or visibility in your report. After exporting
    Excel/CSV, some data might not appear properly. In SSRS 2008 R2, it has reported this kind of issue about data missing after exporting. However, those scenarios are not exactly same as your issue. It mostly turns out be conflict between data and “layout render”
    and related to DataElementOutput property. DataElementOutput property controls export behavior, it indicates which report item data should appear in Excel/CSV render. For more information, please refer to this article: Reporting Services:
    Why aren’t all my report columns exporting to CSV and/or XML?.
    As we tested in our environment(SSRS 2008 R2), no matter what we export into CSV or Excel, we get same results as in BIDS . So I would like to know your report design structure. If possible, please provide some screenshots about results in BIDS and Excel/CSV
    render extension results. It may help us find out the root cause of your issue. Thank you.
    Best regards,
    Qiuyun Yu

  • Template with tabs Export to excel with variable dataprovider

    I have looked at examples in this forum of how others have used an "export to excel" button with a variable dataprovider but I cannot get these examples to work for my situation.
    I have a web template with 2 tabs, 1 dataprovider on each. The template has an icon button for "export to excel". The code came from 0QUERY_TEMPLATE. The tabs require a JavaScript function which hides all items except for the one on the selected tab and sets the property for the selected tab. I got the code for this from the WEB API reference for BW 3.x.
    I cannot get the button "export to excel" to export the selected (non-hidden) data provider. I need somehow to have a variable for dataprovider on the command to export. 
    Any help would be greatly appreciated.
    Provided below is my template.
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_PROPERTIES"/>
    <param name="TEMPLATE_ID" value="ZTEST_EXPORT"/>
    <param name="VARIABLE_SCREEN" value="X"/>
    TEMPLATE PROPERTIES
    </object>
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DATAPROVIDER_1"/>
    <param name="QUERY" value="ZPC_010"/>
    <param name="INFOCUBE" value="ZPC_M01"/>
    DATA_PROVIDER: DATAPROVIDER_1
    </object>
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DATAPROVIDER_2"/>
    <param name="QUERY" value="ZPC_011"/>
    <param name="INFOCUBE" value="ZPC_M01"/>
    DATA_PROVIDER: DATAPROVIDER_2
    </object>
    <html>
    <head>
    <link href="/sap/bw/Mime/Customer/StyleSheets/ServicePortalBWReports.css" type="text/css" rel="stylesheet"/>
    <Script type="text/javascript">
    <!--
    /* function goto_tab: Show all items, starting with tabname, Hide all other items */
    function goto_tab(tabname) {
    SAPBWOpenURL(SAP_BW_URL_Get()'&item=TAB*&multi=X&hidden=X&cmd_1=item%3d'tabname+'*%26hidden%3d %26multi%3dX');
    /* DHTML function to set correct span-Tag visible
    For each Tab in Tab-Header (head_TAB) check, if item TABx is visible
    If Item is visible set Header as selected
    Otherwise set corresponding span-Tag to not visible */
    function set_actual_tab() {
    i=0;
    do {
    i++;
    if (document.getElementById('head_TAB'+i) != null) {
    /* Check if Object tag is hidden */
    var prop = SAPBWGetItemProp('TAB'+i);
    var hidden=true;
    if (prop != null){
    for(j=1;j<prop.length;j++){
    if (prop[j][0] == "HIDDEN") hidden = (prop[j][1]=='X');
    if (hidden) {
    document.getElementById("TAB"+i).setAttribute('style', 'display:none;visibility:false;',false);
    else {
    document.getElementById("head_TAB"+i).setAttribute('className', 'SAPBEXTbsTABsel',false);
    } while (document.getElementById('head_TAB'+i) != null)
    -->
    </script>
    </head>
    <body>
    <TABLE class=SAPBEXNavLineBorder cellSpacing=0 cellPadding=1 width=5 border=0>
    <TR>
    <TD width="5%">
    <TABLE cellSpacing=1 cellPadding=2 width="100%" border=0>
    <TR>
    <!-- Display Export Excel--->
    <TD class=SAPBEXNavLine><A href="<SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DATAPROVIDER_1'>">
    <IMG alt="Export to MS Excel" src="Mime/BEx/Icons/S_X_XLS.gif" border=0></A></TD>
    </TD></TR></TABLE></TD></TR></TABLE>
    <TABLE cellSpacing=1 cellPadding=5 width="75%" border=0>
    <TR>
    <TD vAlign=top>
    <P>
    <TABLE cellSpacing=0 cellPadding=5 border=0>
    <TR>
    <TD class=SAPBEXTbsTab id=head_TAB1><A href="javascript:goto_tab('TAB1')">Tab 1</A></TD>
    <TD class=SAPBEXTbsTab id=head_TAB2><A href="javascript:goto_tab('TAB2')">Tab 2</A></TD>
    </TR></TABLE>
    <TABLE class=SAPBEXTbsBdyEdg cellSpacing=0 cellPadding=5 width="5%"
    border=0>
    <TR>
    <TD vAlign=top>
    <SPAN id=TAB1><object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="GET_ITEM"/>
    <param name="NAME" value="TAB1"/>
    <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
    <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
    <param name="GENERATE_CAPTION" value=""/>
    ITEM: TAB1
    </object></SPAN>
    <SPAN id=TAB2><object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="GET_ITEM"/>
    <param name="NAME" value="TAB2"/>
    <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
    <param name="DATA_PROVIDER" value="DATAPROVIDER_2"/>
    <param name="GENERATE_CAPTION" value=""/>
    <param name="HIDDEN" value="X"/>
    ITEM: TAB2
    </object></SPAN>
    </TD></TR></TABLE></P>
    <SCRIPT type=text/javascript>
    <!--
    /* This function call is needed to set the correct state */
    set_actual_tab();
    -->
    </SCRIPT>
    </TD></TR></TABLE>
    </body>
    </html>

    Kevin,
    Try calling a javascript function (e.g. excel_export) when the export icon is clicked on.
    Using the prop array find the tab that is not hidden and then use that index to build your export command. i.e. if tab1 is visible then pass dataprovider_1 to the excel download command.
    Another method would be to place a hidden field on the form to store the dataprovider and then read that field in the javascript function.  You would have to update this field when you switched between the tabs.
    Cheers,
    Kelly

  • Inner table output to Excel with colored cells?

    Hi!
    I would like to output my inner table into Excel ducoment.
    And it is important to have Excel document with colored cells.
    I have searched for this solution, but could not find...
    Any help will be awarded!
    Kind regards, M.

    Hi,
    You can use function module "XXL_SIMPLE_API"
    or alternatively use "XXL_FULL_API".
    On the import, parameter name "N_KEY_COLS" is used to colour fields. The headings are automatically coloured. 1 is the default value.
    This reply is nearly 1 year after the last post
    Regards,
    Daniel

  • OBIEE 11.1.1.5.0 export to excel with filters?

    Hi all,
    Is it possible in OBIEE 11.1.1.5 to export the analysis with the current filters?
    Thanks in advance,
    Alexander.

    Go to View Options where you will select Narrative View or Pivot Table under that you can see a Filters,Just click and export the results to excel it will work,Below the screen shot for your reference.
    Recordings_2 - Download - 4shared
    Mark if helps.
    Thanks,

  • How to export table data with coloring of cell according to value.

    Hi all,
    I am using jdeveloper 11.1.1.6
    i want to export table data with lot of formatting. like with coloring of cell according to value and so many.How to do that?

    Hi,
    like with coloring of cell according to value and so many.How to do that?
    Answer is, you can't
    Frank

  • Export to Excel with formulas

    I have a requirement to produce reports that can be exported to Excel along with cell calculation formulas. The cell formulas will do the same calculations as done in the report. The reports will be created in our company using Oracle Reports, then exported to Excel for use by our customer. This is a government requirement (who else!) to allow them to do "what if" scenarios with the reported data. Is there any way to populate Excel worksheet cells with formulas as well as data? The reports will vary in length and content depending on user selections so I can't take a "one size fits all" approach.
    Any suggestions will be greatly appreciated.

    Can't you use the same library to do that? Apache POI for instance has formula support

  • Export to excel with maximum 65536 rows

    Hi
    My reports are desinged with CR 8.5 report designer. I have some history reports that's large. When I export them to excel 2000 or 2003. It cuts off at row 65536. I did some research and it seems to me that is the max rows for excel 2003 and lower versions. I have 2007 too and it has max rows over a million now. Is there any thing I can do to make it export all my reports?
    Any suggestions are greatly appreciated.
    Mary

    Hi Mary,
    As you discovered pre-Excel 2003 has a physical limit of 65K rows. If you updated the exporting patches for CR 8.5 you should see the new Excel export options and what it should now do is create a new sheet for rows over 65K, but that may have been added in a later version of CR. Only other option is to export to CSV and then import to Excel as suggested.
    Thank you
    Don

Maybe you are looking for

  • How can i Display images with may own table

    Hi I want display images with my own table. How can I use in this query. SELECT    '<a href="#" onclick="javascript:'        || 'getImageHeight(''my_img'        || '#ROWNUM#'');javascript:redirect'        || '(''f?p=&APP_ID.:212'        || ':&SESSION

  • I can copy PDF file directly into Notability apps. Can I copy other documents such as word.

    From Docs ToGo I can transfer PDF file directly in Notability with Open in. Can I do the same with other docs such as word, excel Thanks

  • Please review my CLD practice exam

    Hi all, I'm working my nerve up to take the CLD.  If anyone has the time, I'd appreciate some advice on style, test rules, etc. based on my solution to the Traffic Light sample exam. Seemed a lot easier than the car wash exam.  Is this an older exam?

  • Why is my Macbook Pro fan running constantly?

    I have a question as to why my MacBook Pro 15" fan is running constantly?  Can anyone give advice? Thank you!

  • Focus SAPGUI after Scripting

    Hello, i developed an html-page containing some vb-script to use sapgui-scripting. this script works fine so far. it starts a va02 transaction with a ordernumber, comming from my web-application. But when working in my web-frontend and starting the s