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.

Similar Messages

  • JSF with JavaScript ! Problem with OnLoad()

    Hello,
    I have a .js (javascript) file which has one function. I want to call this function in my jsf-jsp page form.
    The javascript run successfully without onload. But when i use onlod it is giving me error like "
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: /Webcam.jsp(11,109) Attribute onload invalid for tag body according to TLD
    1. How can i use the onload event with forms or body with jsf ?
    After this, i want to use some if else code with my jsp page. Normally we do this using scriptlets in jsp. So how can i do this on the jsf-jsp. Should i use backing bean to write the same code ?
    Actually i want to invoke different applications based on coditions on the return of my javascrit function.
    Can anybody has tips, solution on this ?
    -Sachin
    EpiComm Technologies Ltd.

    BalusC,
    If we want to set focus to a particular element, then
    this won't work.
    If runScript() function is referring to any form
    element we get an error stating that
    "document..forms.formname.elements is null.
    any ideas how to set focus when the form loads?Then put the script in the bottom of the JSF code, straight before the end body tag. At this place all JSF components are finished with generating.
    <html>
        <head>
        </head>
        <body>
            <f:verbatim>
                <script>
                    setFocus('</f:verbatim><h:outputText value="#{myBean.focusId}" /><f:verbatim>');
                </script>
            </f:verbatim>
        </body>
    </html>

  • Coldfusion with javascript alert problem with apostrophe

    Hi
    I have alert ("thanks for sing up #fname# - #lname# ")
    but fname='Charles's
    lanme ='Charles's'
    so javascript is not interpret with apostrophe . how can i
    resolve it thanks

    JSStringFormat()
    http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=ColdFusion_Documentation&file=00000543.htm

  • VBScript editor with Intellisense/Code Hinting support for Adobe App

    I am looking for some tool to write my InDesign VBScript files in. I would really like to know if there is any which support Intellisense/Code hinting for Adobe programs (InDesign especialy). Do you have anything to recommend?
    I am quite good at hacking my computer, so no registry change etc. is a problem for me, I just can not find any. I already tried PrimalScript 2009 but it doesn not work.
    What I need is that in following block of code
    Set myInDesign = CreateObject("InDesign.Application.CS4")
    Set myDialog = myInDesign.Dialogs.Add
    I will get list of all methods/properties after I write the dot after "myInDesign" in second line. But it never worked. I even tried to put "InDesign.Application.CS4/C:\ProgramData\Adobe\InDesign\Version 6.0\cs_CZ\Scripting Support\6.0\Resources for Visual Basic.tlb" line into Options>Text editor>Type libraries.
    I am using Windows Vista SP1 and I have Adobe Creative Suite CS4 installed (upgrade from CS3 which was upgraded from CS2)
    Thanks a lot for any help/suggestion, as I start feeling desperate.

    Hi Everyone!
    As I have said, I waited for next service release, which is as of now PrimalScript 2009 version 5.0.614 and I did some testing with it.
    Results:
    WinXP EN Professional
    - Just pointing PrimalScript 2009 to typelib, no creative suite installed, working
    - Installed Creative Suite CS3 Czech (trial mode) - Working, no need to setup anything
    - Installed Creative Suite CS3 + CS4 Czech (trial mode) - Need to point PrimalScript 2009 to correct typelib, then 100% working
    Windows Vista SP1 Ultimate EN (in trial/not activated mode)
    - Just pointing PrimalScript 2009 to typelib, no creative suite installed, working
    - Installed Creative Suite CS3 Czech (trial mode) - Need to point PrimalScript 2009 to correct typelib, then 100% working
    - Installed Creative Suite CS3 + CS4 Czech (trial mode) - Need to point PrimalScript 2009 to correct typelib, then 100% working
    Windows 7
    I am not planning to use Win7 in near future, so I did not not run any test on it.
    Windows Vista SP1 Home Premium Slovak (fully activated)
    - Installed Creative Suite CS3 + CS4 Czech (full mode) - Not working. This is my main machine. It is Creative Suite CS2 upgraded to CS3 then CS4 (it is running for years without reinstall). I use CS3/CS4 side by side for some older projects. There are still references to CS2 in registry. I tried pointing PrimalScript 2009 to correct typelib, but to no avail. My conclussion is that there is someting messed with its config or registry, but I am pretty sure it would run after complete system reinstall.
    Both WinXP EN Pro and Vista SP1 Ultimate EN were clean install into MS Virtual PC 2007, with only Creative Suite and PrimalScript 2009 5.0.614 installed into each machine so I made sure there are no other issues involved.
    As I spend 80% of my time with developement of websites and scripting of MS Office/Creative Suite, I have some virtual machines set up for testing purposes. I will use one of them for development in PrimalScript and move it to main (real) Windows Vista Home Premium Slovak installed once I will decide to completely reinstall it. The need for seting up the typelibray link is no deal for me, as it is working as expected then, and I expect a lot ;-)
    So problem solved, I found o program I will use. There may be others which do better or are cheaper (but I do not know about any) but $299 is not a big issue when I get what I want.
    P.S.: The solution with making VBScript code with VBA declaration (using Dim) is not a solution I like, as I would need to comment it out everytime I run/edit  the script and it would be pain in the *** while debugging it as i would need to do lot of comment/uncomment cycles and i can use my ime better then doing the monkey work as some fo the scripts I write are quite huge and I prefer to build them incrementaly and test/debug a lot.
    I wish to thank everyone for their help and suggestions,
    Matus

  • Reports output delayed when exported to Excel using OLE2

    Hi All,
    Platform - Oracle Application Server 10g Release 2 10.1.2.3 on Windows 32 bit.
    The report output is getting generated in a minute when exported to PDF i.e destype=cache & desformat=pdf. When we generate the output to excel is considerably delayed. It is taking time and internal server error is occuring.
    1) Report developed with simple query
    2) Used RPT2XLS procedure which uses OLE2 builtin to export report output into excel.
    3) Called RPT2XLS.run procedure in After-Report trigger of the report.
    4) We have relased all memory objects in the RPT2XLS package after exporting data and there is no EXCEL.exe running once the file is generated.
    System parameters used in the URL.
    . destype=file
    desformat=pdf
    CONTAINSOLE=yes (Required for exporting OLE2 objects into Excel in report)
    desname=path & name of the file.
    I have gone through the tuning documents for reports server and increased minengine, maxengine and initengine parameters of the reports engine and also changed maxconnect and IdleTimeout parameters in reports server configuration file.
    What might be the reason for delaying in the output of the reports when exported to Excel. Can the guys with special knowledge on this area help us in getting out of this issue.
    Thanks in advance.

    hey all,
    Thanks everyone for the reply.
    I am using the foloowing field cat:
    l_col_pos = l_col_pos + 1.
        wa_fieldcat-col_pos = l_col_pos.
        wa_fieldcat-outputlen = 32.            
         wa_fieldcat-fieldname = 'SOLLWERT'.
         wa_fieldcat-inttype   = 'P'.             
    *    wa_fieldcat-tabname = 'i_final'.      
        wa_fieldcat-seltext_l = text-t11.         "Target Value
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR wa_fieldcat.
    I have use this also in the field cat but stil i get space in the excel header.
    wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
    *    wa_fieldcat-REF_TABNAME =  'QAMV'.
    Also the space comes with the descrip[tion in the cell of excel.
    its like [space Target Value] and i dont need this Space.
    I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
    Please suggest

  • Export to Excel not Working

    Hi
    I'm using JDeveloper 11g TP4 and in Firefox 3.X export to excel not working
    Regards,
    JavaDeVeLoper

    Java developer,
    Firefox 3.x is not one of the documented supported browsers for 11g TP4 (FF 2.0.x and IE 7 are).
    I'm assuming by "export to excel," you are talking about an adf faces table?
    John

  • 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

  • Export Interactive reporting with javascript

    Hi,
    i have some problem when i try to export in excel my report created with Interactive Reporting.
    I use the javascript code inside the button and at onClick event i succeded only the file conversion in mhtml format.
    The next step is conversion from mhtml in xls format, but i think that the instance JooleObject don't.
    Below the code that i use:
    //**********Create the FileSystemObject
    var objFSO = new JOOLEObject("Scripting.FileSystemObject");
    var strMhtmlFile = "C:\\pippo.mhtml";
    var strExcelFile = "C:\\pippo.xls";
    //************Create the JOOLE Object for Opening Excel File
    var objExcel = new JOOLEObject("Excel.Application");
    //**********If Files Already Exist - Delete Them
    if (objFSO.FileExists(strMhtmlFile))
    objFSO.DeleteFile (strMhtmlFile);
    if (objFSO.FileExists(strExcelFile))
    objFSO.DeleteFile (strExcelFile);
    //**********Export to MHTML Format
    ActiveDocument.Sections["PDC_FIN"].Export(strMhtmlFile,bqExportFormatOfficeMHTML,true);
    //**********Make Excel Invisible
    objExcel.Visible = false;
    //**********Open MHTML File in EXCEL
    objExcel.Workbooks.Open(strMhtmlFile);
    //**********Save As Copy of MHTML File into .XLS
    objExcel.ActiveWorkbook.SaveCopyAs("C:\\pippo.xls");
    //**********Close EXCEL
    objExcel.Quit();
    Have you any suggestion? There are some libraries that i must import?
    I use Interactive Reporting Studio 11.1.1.3
    Thank you in advance.
    Flavio

    Hi,
    thank you for response.
    I use IR Studio (Desktop) and public the report in the workspace when the report is complete.
    Your suggestion work
    var strMhtmlFile = "C:\\pippo.xls";
    ActiveDocument.Sections["PDC_FIN"].Export(strMhtmlFile,bqExportFormatOfficeMHTML,true);but the problem is that when export the report directly in xls format, the formatting of the report is lose. For this reason i export befor in mhtml and after Open/SaveAS the report in xls format for mantaining the formatting.
    I think that the istruction
    //**********Open MHTML File in EXCEL
    objExcel.Workbooks.Open(strMhtmlFile);
    //**********Save As Copy of MHTML File into .XLS
    objExcel.ActiveWorkbook.SaveCopyAs("C:\\pippo.xls");
    on the objExcel variable (instance of JOOLEObject) don't work.
    I speak with my develop team and decide if adopt your solution.
    Thank you so much.
    Flavio

  • 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

  • Issue with export in Excel in WAD

    Hi
    I have an issue with export to excel in WAD. I have a web template with two or more tabs.
    On the webtemplate I have two buttons to export to excel. One to export the content from the active tab and one button to export content in all tabs.
    My problem is that when I export to excel it always add the current/active content twice. I've tried with both buttons and they work as expected except that they export one table to much (the active).
    can anyone help / give a clue what to look for.
    br,
    John
    Edited by: John Dolph on Apr 15, 2010 10:50 AM

    Hi
    Sorry I has been a while but the problem still occurs,
    I've defined my export button group like this in a seperate template and I expected that it would only return the resultset from TAB_A and TAB_B but it also export the resultset from the tab I'm currently on.
    <bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" />
                <bi:BUTTON_GROUP_ITEM name="TAB_BUTTONs" designheight="23" designwidth="300" >
                    <bi:BUTTON_LIST type="ORDEREDLIST" >
                        <bi:BUTTON type="COMPOSITE" index="2" >
                            <bi:CAPTION value="EXCEL" />
                            <bi:TOOLTIP value="Table, Graph and/or Table/Graph download to PDF" />
                            <bi:ACTION type="CHOICE" value="INSTRUCTION" >
                                <bi:INSTRUCTION >
                                    <bi:EXPORT >
                                        <bi:ITEM_REF_LIST type="UNORDEREDLIST" >
                                            <bi:ITEM_REF index="1" value="TAB_A_ANALYSIS" />
                                            <bi:ITEM_REF index="2" value="TAB_A_CHART" />
                                            <bi:ITEM_REF index="3" value="TAB_B_ANALYSIS" />
                                            <bi:ITEM_REF index="4" value="TAB_B_CHART" />
                                        </bi:ITEM_REF_LIST>
                                        <bi:EXPORT_FORMAT value="XLS" />
                                    </bi:EXPORT>
                                </bi:INSTRUCTION>
                            </bi:ACTION>
                        </bi:BUTTON>

  • Running report with alv grid in background and exporting to excel

    Hi Guys,
                  I've created a report program that uses the alv grid. When I run the report in foreground, I can easily export it to excel. However, if I run it in background, then display the spooled report and try to export to excel, it does not put it in excel format (seems to go over as one big column rather than individual columns that are defined in the report). Is there a way to run it in background ,export to excel properly and i have to email also in Excel sheet format.?
    Thanks,
    Gopi.

    In background u cannot do a download to excel. you can do is create CSV format file
    or
    write a report for output with tabs then call that report using
      submit yXXXX exporting list to memory
               and return.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = report_list
        exceptions
          not_found  = 1
          others     = 2.
    and send the report_list to email users

  • Header of ALV with space when exported to excel using Standard ALV

    Hi,
    I am Using Reuse alv grid display    to dispaly my report and it works fine and I am using the standard SAP application tool to export it to excel.
    But for some of the header fields I am getting space in the excel sheet but there is no space while displaying through ALV.
    I am using the following field catalog for the same.
    wa_fieldcat-col_pos = 10.
      wa_fieldcat-fieldname = 'SOLLWERT'.
      wa_fieldcat-seltext_l  = 'text-t10'.      "Target value (* this has no space here)
      wa_fieldcat-outputlen = 32.
    wa_fieldcat-colwidth_optimize = 'X'.
      APPEND wa_fieldcat to it_fieldcat.
    but there are still space for this Colomn when exported to excel if after optimizing the column.
    kindly suggest what field needs to be passed to the field catalogoe to avoid spaces in excel for the header.
    Thanks
    Ritesh

    hey all,
    Thanks everyone for the reply.
    I am using the foloowing field cat:
    l_col_pos = l_col_pos + 1.
        wa_fieldcat-col_pos = l_col_pos.
        wa_fieldcat-outputlen = 32.            
         wa_fieldcat-fieldname = 'SOLLWERT'.
         wa_fieldcat-inttype   = 'P'.             
    *    wa_fieldcat-tabname = 'i_final'.      
        wa_fieldcat-seltext_l = text-t11.         "Target Value
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR wa_fieldcat.
    I have use this also in the field cat but stil i get space in the excel header.
    wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
    *    wa_fieldcat-REF_TABNAME =  'QAMV'.
    Also the space comes with the descrip[tion in the cell of excel.
    its like [space Target Value] and i dont need this Space.
    I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
    Please suggest

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

  • Acrobat X Pro Does Not Export to Excel with Proper Format

    I just upgraded from AA8 Pro to X Pro because 8.0 didn't run well in Windows 7. It was much easier to export a report from a PDF to an Excel table and in 8.0 I never had this issue with the formatting.
    Sorry for all of the screen grabs, but I don't know else to explain what is happening.
    The the original PDF of the report I need to convert to a table in Excel:
    Using Save As... > Spreadsheet > Excel Workbook, here is the resulting table created by AAX. Note that the date is displayed correctly the format is "Custom":
    Note the "Custom" format displays the date using the standard U.S. English convention, but when you change the format to "Date" it switches to the Chinese convention.
    When selecting the cell containing the September 4th date, it recognizes it as a "Date", but it thinks it follows the Chinese convention, hence believing September 4th is actually April 9th.
    If I select all of the cells and set the format to "Date" and "English (U.S.)", the dates where the Day value is below 13 and could be interpreted as Month, switch with Month and September 9th becomes April 4th.
    Now here is the kicker, if I export the report PDF to a Word doc, the data appears as a table in Word, as it should. I can copy of the table from Word and paste into Excel and the dates are formatted properly. I am frustrated that in AA 8.0, I could select the data, right-click and send to an Excel doc that automatically opened. It now seems that I have to export to a 3rd program and copy and paste the data. Please tell me this is a known issue and there is a fix coming soon for it.
    Again, I never had this issue with AA 8.0 and other than upgrading to AA X, there has been no other changes to my system.

    Hello,
    i am having exactly the same issue with Acrobat X Pro - with linked Excel 2010 tables in Word 2010.
    Has there been a resolution to this eissue - it is potentially very time consuming to work around this issue for me.
    I would post my files but I don't know how to attach them to the thread - only my second post .
    Cheers,
    slobbering_dog
    This is the Word File - the table is an Excel 2010 spreadsheet linked (via Paste Special >Link) .
    This is the resultant PDF file:
    Thanks in advance - again !!
    Message was edited by: slobbering_dog_72

  • ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.

    Hi all,
    In our SAP system (6.0 ECC) we've noticed the following behaviour:
    In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
    We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
    It's possible to have tha same functionality in this new version like in 4.7?
    Regards.
    Edited by: Ole ES on Nov 17, 2010 6:05 PM

    Hi,
    Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
    I think the integrated Excel mode shows '@08@'.
    Best regards,
    Guillaume

Maybe you are looking for