Export to Excel, VARCHAR2 DB Type and leading zeros issue

Oracle JHeadstart Release 11.1.1.2.29
We are using the Export to excel option, but when we have leading zeros it doesn't export it as text so the data is incorrect.
Can any one please tell how doe we configure ADF to have the leading zeros and export it as text rather than as number.
<af:commandMenuItem partialSubmit="true"
textAndAccessKey="#{nls['EXPORT']}"
icon="/jheadstart/images/excel.png"
immediate="true" id="cmi0">
<af:exportCollectionActionListener exportedId="IdLookupTab"
type="excelHTML"/>
</af:commandMenuItem>
Regards
Ram

you could add an apostrophe ' in front of all fields that you want exported as a text.
this will ensure no truncating is done.
it's excel that does the shifting, so you can't really interfere from the SAP side

Similar Messages

  • Problem on Export to Excel - converts Long type field to General (Unknown)

    hello! i used JSP to export table data to excel.. there's nothing wrong with the data displayed.. But the problem is.. when one of the fields is computed and retrieved in the JSP, and then exported to excel, it converts the Long type field to General and therefore cannot be computed when being used in a formula. Also, when you change it's type by right clicking the cell and chose "Format Cells", it still can't change it's type to number even if you have it changed. Therefore can't be computed..
    I have other number fields but they were just retrieved and not computed as they were exported to excel.. But they don't change their types like the computed ones..
    please help.. thanks

    hello! i used JSP to export table data to excel..Yuck. :p Didn't even consider it being possible. I'd use a servlet anyway, after all, it's designed to be able to stream out non-HTML.
    there's nothing wrong with the data displayed.. But
    the problem is.. when one of the fields is computed
    and retrieved in the JSP, and then exported to excel,
    it converts the Long type field to General and
    therefore cannot be computed when being used in a
    formula. Well, since there is no class in the standard API that handles Excel files, you migh want to ask the support of whoever provided your tool.

  • SSRS 2012 export to Excel 2010 Via IE8 has many compatibility issues

    Hi There,
    We have many reports in SSRS 2012 which had originally developed in SSRS 2005. When ever we render these report into Excel we face two major issues;
    First: After reports render in to Excel (xlsx) format, we have cell, column, row shifting problem and every element of the report is not in the same place as appose to 2005 render to xls format. Second.
    for any drill through (link) report all the url will be blocked by Excel. 
    We use SSRS 2012, Office 2010 and IE 8. Also we don't want to add Export to Excel 2003 feature. In other word we want out put in xlsx. 
    Any solution, suggestion, hotfix is appreciated 

    Hi Mercede,
    According to your description, after you updated SSRS 2005 reports to SSRS 2012, reports render appose to 2005 when export them to Excel, and drill through link is blocked.
    Question1:
    A report definition file includes a reference to the RDL namespace that specifies the version of the report definition schema that is used to validate the .rdl file. After a report is upgraded locally or on the report server, you might notice additional errors,
    warnings, and messages. This is the result of changes to the internal report object model and processing components, which cause messages to appear when underlying problems in the report are detected.
    When you open an .rdl file in Report Designer in SQL Server Data Tools (SSDT), if the report was created for a previous namespace, Report Designer automatically creates a backup file and upgrades the report to the current namespace. This is the only way
    you can upgrade a report definition file.
    In order to improve the efficiency of troubleshooting, I need to ask several questions:
    “we have cell, column, row shifting problem and every element of the report is not in the same place as appose to 2005 render to xls format” Could you please provide detailed information about the problem? I would be appreciated it if you could provide
    a screenshot.
    Did you update the reports by opening the .rdl files in SSDT?
    Could you export report to Excel 2003 to see if it displays correctly?
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    Question2:
    I tested the issue in my local machine, when we add drillthrough action to the report, if we select Go to report or Go to URL, the link works fine after we export report to excel. It failed to work when we use javascript:void window.open to open a URL in new
    windows, the “window.open” can’t work in Excel because of the JavaScript protocol can work only with an exact page.
    For more information about Upgrade Reports, please refer to the following document:
    https://msdn.microsoft.com/en-us/library/ms143674(v=sql.110).aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support
    Hi Wendy,
    Thank you much for your fast respond. And as for your questions:
    1- Yes I did upgrade them by using SSDT tools in VS2012 and then deploy them again into our SSRS2012 report server.
    2- For URLs and Hyperlinks, because the action is go to sub report, I used "Go To Report" and by look at content that been blocked by Excel, I have noticed that (Go To Report) action passes IP address of our SSRS Server . I don't know how can I change
    it to use the actual path instead.
    3- Shifting the Cells and Rows means when I export report (from SSRS 2005) to excel in xls format (Excel 2003 for example), has very same look as it shows in screen, but when I export it from ssrs 2012 to render it in to xlsx format (Excel 2010 in our case)
    I face with merging cells and when I compare this xlsx out put with xls out put of very same report I have see the row that used to be on A23 for example now is in A20 or the column that used to be in A7 now is in B9 for example. And required a lot of manual
    work on design to work with spaced between text boxes and location of each data region, and overlaps to get the same result. I want to know is there more efficient way to achieve the same out put as  xls.
    4- I can't export report to render in Excel 2003 (xls) format directly from SSRS server for we don't have that option in our export list, but I did "save it as" xls and faced the same Row, column, cell shifting as with xlsx.
    Thank you so much 
    I am realistic, I expect miracles.

  • Excel file attachment withiout losing leading zeros

    Hi Expert,
    Can anybody tell me how to create the Excel file attachment for email generation without losing the leading zeros.
    Regards,
    Jyotsna

    Hi,
    If you want to pass a variable with leading zeros to excel sheet, please use the following:
      CONCATENATE  '=TEXT('  l_variable ',"000")'  INTO g_errcode1.
    It will display the leading zeros in excel sheet. I have done the same way in one of my program and it is working fine..
    Thanks & Regards
    Rocky Agarwal

  • Regarding output type and idoc trigger issue

    Hi
    i need to copy pgi quantity into sales order quantity for that i write a code into user exit MV50AFZ1. code is working fine but
    output type and idoc is not trigger due to this. In this exit to update sales order quantity i used bapi *BAPI_SALESORDER_CHANGE . can anyone tell me why o/p type and idoc not trigger ,what is the reason and what is the solution for this?
    Thanks
    Dinesh

    Hi Dinesh,
    Did you activate the enhancement for user exit ?
    Did you check if the output type is configured correctly ?
    Put a debugging point and see if control is coming there.
    Regards,
    Nisha Vengal.

  • Excel 2010 - How to remove leading zero's

    I have a column of ID numbers, which looks similar to this:
    001
    002
    010
    011
    I want to remove all the leading zero's so it looks like this:
    1
    2
    10
    11
    Can anyone help please?

    1) Put a value of 1 in a cell (formatted as General)
    2) Copy that cell with the value of 1
    3) Select the range of values with the leading zeroes
    4) Paste > Special > Multiply

  • IR - Column with leading Zeros issue

    Hello,
    I've got an IR report which includes as "default report settings" 1 column with leading 0s. In order to export to Excel that column as text rather than as a numeric I followed a workaround proposed before in this forum (excel copy drops leading zeros
    In essence this workaround is to create an identifical column but in "excel text format" and display the columns depending on the request value: INSTR(NVL(:REQUEST,'YABBADABBADO'),'CSV') <> 0 for example.
    This works just fine for the default report.
    The problem arise when a user creates his own customise report that includes the mentioned column and saves it as a named report. Here, when the results are exported to excel the "excel" column does not appear.
    In fact, just hiding one of the displayed columns produces the same undesired result.
    I would appreciate any comments or suggestions.
    Many thanks
    Edited by: Javier Gil on Jul 20, 2010 7:52 AM

    I have found a better method. In your IR query:
    SELECT LPAD(v.vendor, 7, ' ') vendor,
    /*Just LPAD to a length of the column defined in the database table or to 7, whichever is greater. */
    FROM v, r
    WHERE v.VENDOR = r.VENDOR
    AND date_rcv <= to_date(:P150_CUTOFF,'yyyy/mm/dd')
    AND inv_nbr = ' '
    AND to_stores <> 'T'
    AND (V.VENDOR = RPAD(:P150_VENDOR,10,' ') OR :P150_VENDOR = 'ALL')
    When you download to Excel by Download/XLS (Request=XLS), it preserves the leading zeros.
    In the case of dates, you should LPAD 10 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YY'), 10, ' ') date_rcv,
    I haven’t tried it yet but I think in the case of ‘MM/DD/YYYY’, you should LPAD 12 minimum in this format.
    LPAD(to_char(date_rcv,'MM/DD/YYYY'), 12, ' ') date_rcv,
    Drawbacks of this method:
    Since the string has leading white spaces, you cannot use the filter for the ‘=’ comparison operator. Even filtering using leading white spaces will not return anything. You must use the LIKE and NOT LIKE operator instead.
    Advantages of this method over the original one I posted yesterday:
    1)     You do not have to create another column for download, just one column will suffice.
    2)     Even though the query has leading white spaces, they will not display in the IR region.
    Edited by: richardlee on Aug 5, 2010 11:10 AM
    Edited by: richardlee on Aug 5, 2010 11:16 AM

  • Leading zero issue in Report

    Hi Xperts,
    i have report which has Plant ,Batch and Material.
    Now we found that the Batch that start with "0"  no longer has the leading zeros in the report.
    For Exp:
    Plant-X    Material-123     Batch-0012345
    But in report it is showing,
    Plant-X    Material-123     Batch-12345
    As i have checked in the respective Table and in Cube the batch Number (0012345)  is coming correctly with the leading zero.
    but why the leading zero is not showing in my report.
    Could any one please help me on this issue?
    Regards,
    satish
    Edited by: SAP534 on Mar 31, 2010 8:35 AM

    If your requirement is to show the leading zeros for the Batach, then i will suggest you to redesign the batch infoobject with the compunding objects of material and plant. 
    You have another option like to display the batch from master data in your report by making it as anavigantional attribute in your cube.
    We do have the similar requirement and our business prefered to have Batch compunded with material and plant. Check with your Business and go aheead with the changes.
    Hope this helps.
    Regards,
    Reddy

  • ALV Leading ZERO issue

    There is leading zeros in internal table passing to FM 'REUSE_ALV_GRID_DISPLAY'
    but i am not able to see the leading zero in alv report display. how fix this.

    hi
    check out
    have u added no_zero(1)     type c, in fieldcatalog.
    if yes than remove it.
    else
    pass the value by function module 'CONVERSION_EXIT_ALPHA_INPUT' .
    hope this will help u.

  • Numbers Export to Excel adds 1 Row and 1 Column to the Freeze Header/Columns.

    Exporting a Numbers file to Excel, that has 1 Freeze Column and 5 Freeze Headers, somehow adds an additional Row & Column when opened in Excel.
    Thoughts?

    I found the answer to this question with help from SAP Support.
    In the Cross-Tab Expert, Customize Style tab, click "_Column Totals on Top_".
    Then, the Excel Data Only report will show the row titles Top-aligned for the row group.

  • Newbie: BW Export to Excel/CSV file destination and file name

    Is it possible to control where the export of a BW web query is sent by appending the url with some tag voodoo? Also, can I create the file name of the exported file? I figured out how to kick off the export process, but haven't found any code to control the export destination or file name. I wish to skip over the save dialog and write the file to a specific location.

    Hello John,
    BW provides several ways to export data. Please look into Open Hub for example.
    Other options include Information Broadcasting in SAP NetWeaver '04 or MDX, XML Webservices, or OLAP BAPI.
    Regards,
    Marc
    SAP NetWeaver RIG, US BI

  • Function module to get the decimal point and leading zeros.

    Hi
    I have a requirement, where I need to add zeros at the end and beginning of the field along with decimal point.
    For Eg:
    input = 123
    output = 0123.00
    depends upon the requiremnt,number of decimals will vary
    If anyone knows function module for this  requiremnt  or how to proceed with this, Please give me reply
    Thanks&Regards
    Rama.Mekala

    hi
    use this Fm
    'conversion_exit_alpha_input'
    PP_CATT_CONVERT_DECIMAL_POINT
    for decimal points
    Cheers
    Snehi
    Edited by: snehi chouhan on Jun 23, 2008 9:28 AM

  • Display of leading zeroes when downloaded from ALV to excel

    Hi All,
    I have a problem in ALV grid display.
    There is a specific field which has value starting from '001' to '999'. This is a char(3) type of variable.
    The problem is that the display shows the value as '001' which is correct. but when the same file is dwnloaded to excel using standard SAP functionality, the value of the field gets changed to '1' instead of '001'.
    Is there any option by which this can be controlled. Please let me know, its urgent!!
    thanks

    hi Ankur,
    the Excel download is done by Z program? IF yes you have to do:
       SET PROPERTY OF go_cell 'NumberFormat' = '@'.
    this will set the Excel cell to Text type and leading zeros won't be lost.
    ec

  • Character drops zeros when exported to Excel

    I have a template that when exported to Excel from E-Business Suite, drops the leading zeros. We want those zeros to be there.
    For example, Project Number 000400 is SEGMENT1 of PA_PROJECTS_ALL so when viewed in Word, it shows the full text string. When the user exports to Excel, it drops the three leading zeros and just displays 400.
    Is there a way around this?
    Thanks,
    Rob

    Use a special character called a non-breaking-space and that should resolve your issue. Put it before or after your xml field
    Insert->Symbol->Special Characters Tab->Nonbreaking Space
    or
    Ctrl+Shift+SpaceIf this works, don't forget to give me some points. :-)
    Ike Wiggins
    http://bipublisher.blogspot.com

  • Need help on avoid truncation of leading zeros while export to Excel

    Hi
    I am using crystal reports XI version and facing numerical format issue while exporting data from crystal report viewer to excel file, it is removing leading zeros in a alphanumeric field (String field from DB)
    Thanks
    Nagamani

    The only thing that might do this would be to append an apostrophe (') to the beginning of the field.  What I would try is:
    1. Add a text object to the report where you want this string to appear.
    2. Type an apostrophe in the text box.
    3. Drag the field into the text box so that it's to the right of the apostrophe.
    If you don't want the apostrophe to appear when viewing the report, try this:
    1.  Right-click on the text box and select "Format Object".  Set the font color to be the same as the background color.
    2.  Double-click in the text box.
    3.  Select the field, right-click on it and select the "Format..." option.  Set the font color to black or whatever other color you're using in your report.
    -Dell

Maybe you are looking for

  • How to develop EJB 3.0  Session Beans under WL Workshop 10.3?

    Hi there, I know the theory about EJB, no problem there, but I've been trying to develop some EJB's on WLW, and I'd like to ask you two things: 1. Is there any guide to follow? I found this web page, but I feel it's not quite enough. 2. How do you do

  • Problem with substitution

    hi there, a employee is on vacation, so he has activated substituion for workflows. normally HE PLUS the substituion-person are getting emails from the workflow, etc........ but in this case ONLY the subtituion person gets the emails, etc... and is a

  • Macbook keeps asking for password OS X

    when starting up  my macbook it asks for the password, after starting an application eg safari it gives a blue screen and after that asks for the pasword again

  • Wrong screen resolution

    I know, this is a common problem, but after hours of googling and browsing Wiki and Forums I haven't fixed it. So... I'm running the latest Arch + KDE on my new laptop, which has AMD graphics card and the display native resolution is 1366x768. But th

  • Full export and import

    Hi All, Kindly give me the document id or links for fully datbase export and import procedure, by the by I am doing full export and import in V 7.1 and the OS is OpenVMS. Satya.