Excel data formatting

Hi all,
following the tutorial "Exporting context data into Excel using the WD binary cache" I've added an export function to my wd app for a table's contents.
In the Excel document I'd like to treat all as text, avoiding e.g. the null values written, the ...E+17, deletion of leading zeroes and so on.
Can you help me please?
Thanks.
Angelo

Angelo,
If your client's Excel application supports XML format (starting from Office XP, AFAIK) you may produce output in Excel XML rather then CSV(comma separated values) while former allows formatting.
You may get details about MS Office specific XML schemas here http://www.microsoft.com/office/xml/default.mspx .
Next, if this format is useful for you, you may use code posted here (Re: converting context-tree to xml?) to convert context node data to XML. You may either supply XSL template to transform generic XML into Excel-specific XML (better option) or modify original code to produce Excel XML directly.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • Address (char type) to excel (date format)

    i have address 17-1-1 but after i export to excel it become date format.
    how do i solve this prob ?
    tks.

    As ssr has highlighted, this isn't a fault of Oracle but is standard functionality of Excel when importing data. Excel tries to intelligently look at the data and give the cell the correct format based on that data. Because your data looks like a date it assumes it is and will format it as a date according to your nationality settings on your PC.
    ssr suggested putting a quote before the data which is the correct thing to do.
    If the data is:
    '17-1-1rather than
    17-1-1Then excel sees the single quote and understands this to mean that you want the format of the data to be "text" rather than "date".

  • Date format in excel

    hi all,
    i am using form6i.
    i am writing data into excel sheet(using ole2 package). i have one date column among them. The date format in excel should be in 'DD/MM/YYYY'.
    In my form i have date format like 'YYYY/MM/MM HH:MI:SS'. so i have converted that column using
    TO_CHAR(TRUNC(:date_col),'DD/MM/YYYY').So i am getting output in the format what i need,but still in excel i am seeing data format as 'DD-MM-YY'.
    is any conversion is required while writing into excel?
    but when i set the excel data format should be in 'DD-MON-YYYY'
    i am getting output as '26-JAN-10' but i want output in excel like
    '26/JAN/2010'.
    Please help.
    Thanks..
    Edited by: GD on Nov 26, 2011 8:21 PM

    If you want the field to be treated like a DATE in excel, you have to set the column-format to DATE and apply the appropiate Format. To get the needed ole-statements, start the macro-recorder, do the changes in excel and then check whats written in the macro and convert it to OLE.
    If the field should only be shown as a date, you can put a ' in fornt of the date-value.

  • Export to PDF, Excel, Excel (Data Only) formatting issues

    Hi Community
    I have a report that consists of 5 subreports. Out of the 5 subreports, 3 of them have a similar format whereas the other 2 are different.
    Iu2019m currently facing an issue whereby the exports to excel works fine, but excel (data only) has some alignment issues(i.e. the data appears below the correct columns). However, when the report is tweaked to make export to excel (data only) appear correctly, the export to excel had its data shifted out of alignment. There is no impact to pdf exporting at the moment.
    Are there any people who are facing similar issues? Is there any resolution or workaround? I appreciate any help. Thanks.
    FYI, the version of crystal reports is Crystal reports is Crystal reports 2008 and we are using the crystal report viewer interface to export into excel and pdf formats. The excel version is 2007.
    Regards

    DW, i've also run into issues with multiple sub reports. I resolved it by putting each sub report into it's own section, and then suppressing the sub report (Note, if ur trying to export subreport data to excel, I don't think its going to work. You'd need to create shared variables and then bring those sub report shared variables into your main report).
    Once you bring your shared variables into the main report, suppress your sub reports, and then export to excel, you're still left with a dataset that has missing rows. This is ok. You can solve it easily within the excel file itself by sorting the data on a unique ID like Account #. This removes the extra rows.
    Not the most elegant solution, but it works.

  • XML Publisher to Excel Report : Date format problem

    Hi,
    I am trying to create an Excel report with XML Publisher. I have an issue with the Date Fomatting.
    In the XML template, I have set the "Date" column in date format. But the excel output report "Date" column returns as "General text" (string) and it is sorted as text, not as date.
    Can anyone please help me out?
    Thanks!!!

    Hi,
    Did this post solve your problem? I have the same issue that I need to solve.
    I have an xsl-fo template with dates in it.
    The dates are in english.
    My excel is setup to use danish.
    When I export to excel it knows the month jan, feb, mar, apr, ... which are the same in danish and english.
    But months where it differs like may (danish maj) the cell is a general text instead of date.
    Is there anyway you can set/transform the date in the xsl-fo template so it does not care about the language in excel?
    Thank you in advance.
    BR Kenneth

  • List View does not retain date formats from Excel

    i am using List View control to isplay data. When i scroll the horizontal bar inlist view, the date format changes to numbers. is there were to stop this happening.
    regards
    Chandra

    Hi Chandra,
    Are you getting the values from any live connection or is it static data from the excel file?
    You can also try to goto properties of component and in the appearence tab,select the format of the values as "DATE".
    Incase you are getting the values from the live connection, you can select a different cell which would reference to the data coming from the connection and use it into the components.
    e.g.: if values are coming in cell"A1" then goto some empty cell as B1 and type in"=A1" and use this new cell into the component.
    Let me know if this works.
    Thanks,
    Amit.

  • Download to excel using GUI_DOWNLOAD : Date format

    Hi Gurus,
    I am downloading the data from an internal table to excel file using FM gui_download. The date field in my internal table is in the format MM-DD-YYYY (stored as Char 10 field). But when it downloads to excel, the date format changes to MM/DD/YYYY. I want to keep original format of MM-DD-YYYY in excel.
    Please help, sure points for helpful answers.
    should i use FM gui_download only, or is there some Other useful FM.
    Regards,
    Abhishek

    Hi,
    Check the code below:
    v_date = sy-datum.
    IF v_date CA '/'.
      REPLACE '/' WITH '-' INTO v_date.
    ENDIF.
    Regards
    Kannaiah

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • Prblm in Date format when exported to excel

    Hi ,
    I had a problem when using the Export To Excel option from Portal. The data is getting fine populated in Excel but it's in General No Specific Format. But I wanted the data to be in its original format even when exported to Excel. Like...
    Country -
    Date Goods Delivered
    India----
    01.01.2001
    America----
    05.12.2004
    Singapore----
    12.04.2003
    Here the country should be of type TEXT FORMAT and Date Goods Delivered should be in DATE FORMAT(Here its visible as date but it's in General format)
    I am facing problem with date, it is displayed(01.04.2006) as shown above but it's in general format. I wanted it to be in date format at excel.
    I am in BW3.5 with portal version EP7.0
    Please suggest the solution and I had even gone through previous forum questions related to this but couldn't get.....the solution.
    points will be assigned...
    Regards,
    rudra.

    Hi,
    My end users requirement is to get all data in Standard format. We can't ask to select the date column and change the format in excel as there are more date fields(columns ).
    Using macro i had one problem,even though i am not sure..
    i can't enable the macro to get enabled in page load of export to excel as it is to be done at users end...
    If theres any possibilty of enabling....pls let me know
    Thanks for your valuable suggestions...
    Regards,
    rudra.

  • Output report data to excel file format or csv format

    Is there any way to save softcopy of report output to excel file format or csv format.

    Hi,
    Regarding csv file format, i have no issues. The file is generating without any issues in using oracle reports without using any PL/SQL code.
    My requirement is to design oracle reports to generate excel (.xls) file with multiple worksheets. Each sheets are having many data and graphs(chart).
    Using oracle reports alone, how to achieve this.
    In oracle reports 10g 1.2.0 version, I tried by creating .rdf file but, it is generating single worksheet only.
    In oracle reports 10g 1.2.0 ver, I tried by creating .jsp file. For this first i am creating excel template about how my ouput column headings all that going to be with one sample hard coded data and save the excel file as web page.
    Eg employee.html.
    Next open the html file in oracle reports builder and double click the websource now, you will see the jsp tags, html and xml tags. Now include the contentType="application/vnd.ms-excel " and charset also.
    Next, include the <rw:foreach id="G_EMPNO_1" src="G_EMPNO">
    here insert the fieldl for each column by removing the hard coded values.
    close the tag
    </rw:foreach>
    Save the file as .jsp and deploy it in oc4 enabled folder (say, devsuite_home/reports/j2ee/reports_ids/web
    Start the oc4J server
    Run it in the browser http://server:port/reports/emp.jsp?useride=uid/pwd@db
    It is invoking the Microsoft excel with 3 sheets default and my emp table output in the first page.
    We can save this output file as .xls file by clicking file -> save as.
    1) The question is, it is working fine with Microsoft excel 97-2003 version. But for excel 2007, i am not able to create single html file like how 2003 save web page option.
    2) I found this in oracle getting started demo
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    Which is more useful. This is what i am looking for.
    I done that in excel 2003 as per demo. But excel 2007 with reports 10g issues.
    Is there any demo for 10g with excel 2007
    3) For most of excel issues working fine with excel 2003 and 10g. But excel 2007 with 10g reports are issues.
    I want the excel output from oracle reports with multiple worksheet similar to the above demo.
    Thank you.

  • Export to excel issue - date format cannot be displayed properly

    Dear all,
    When we do a export to excel, if it has date format, we always have problem on displaying it in excel. Some of the date if we change the data format, it will be changed to the correct way. Others will remain the old data format. Any idea?
    I've checked the SAP note. It doesn't work. Thank you in advance.
    Regards,
    Yuka
    SAP Note:
    Click the Excel symbol in the task bar in Business One
    Save the file as ".txt"
    Open Excel and open the file as a ".txt" (Select in "Files of type" All Files (,))
    In the Text Import Wizard Select "Delimited" and for "Start import at row" 1.
    Click "Next"
    In the Text Import Wizard - Step 2, select 'tab' in "Delimiters", for "Text qualifier:" choose ""
    Click "Next"
    In the Text Import Wizard - Step 3, highlight the Date column and in "Column data format" check the radio button Date in the drop down menu beside Date you can set the date format you require
    Click "Finish"

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

  • Excel import to numbers- date format issue?

    importing excel to numbers means my date format goes to a 5-digit number. I've ensured that the Excel cells are correctly formatted as dates but it keeps happening. Any ideas?

    see the reply by BadUnit at the bottom of this thread:
    https://discussions.apple.com/message/24099788#24099788

  • Problem with reading English UK date format in Excel

    When I build and debug the rulebase I get the following error: Error in rulebase: "Cannot perform comparison expression on right expression with type number".
    The actual problem is that it does not read the date correctly in Excel. I have got the following date comparison >=31-09-2011 in excel. Instead of reading 31st September 2011 it tries to reed as 9th of the 31month 2011...
    I have set all language and location, region settings to English United Kingdom (dd/MM/yyyy), United Kingdom but it seems it does not help. In Excel I have set English UK as well.
    OPM version: 10.1.0.27
    Windows 7
    MS Office 7
    I had this problem previously but I resolved by changing language or location setting I think, or language for non-Unicode programs. I cannot remember exactly. But this time it seems it does not work. Reinstalling does not work either.
    Can anybody help with this?
    What settings OPM uses to read the date?
    Thank you!

    Jasmine, you are right 31-09-2011 is a wrong date, I just typed any date as an example and didn't realize that it is an impossible date . We use many dates in Excel in a format dd-MM-yyyy (we do not type in date in runtime).
    In the link you have sent it says that "Formatted attribute values based on rulebase region are used".
    Date:
    " if your region was set to the United States you would see the following: MM-dd-yy"
    "Region set to Australia, which includes the date format dd/MM/yy
    Region in our project is set to United Kingdom so the date format should be dd-MM-yyyy.
    I have checked that OPM Project Properties Language is set to English (UK) so it should be fine.
    The strange thing is that it works fine on other laptops - the date 03-09-2011 is red as 3 September 2011, but on my laptop it is red as 9 March 2011.
    When it comes to read the date 30-09-2011, on other laptops is red as 30 September 2011, but on mine cannot make a date as there is no month number 30 so it throws the error "Cannot perform comparison expression on right expression with type number"... What actually happens is that on my laptop OPM reads the dates from Excel in American format.
    As I wrote earlier, It was working fine at my laptop as well before reinstalling Windows. I had this problem long time ago again but I was able to resolve it by changing language,region settings in Windows I think.
    Now it seems like I have got the same language,region settings in Windows as I had before, my colleagues got the same language, region settings on their machines as well.
    Iit seems like dd/MM/yyyy is red fine (UK format), but the format dd-MM-yyyy is red in American format...
    What settings should be set in Windows or Excel or maybe somewhere else OPM to read the date from Excel in English UK format dd-MM-yyyy?

  • Date format in Excel report output

    Goodmorning All.
    Am using XML publisher for some reports. The current report is in Excel. Everything is fine on this. I want to print the date parameter in 'MON-YY' format.
    In the 'Text Form Field' option, I have used the type as 'Regular Text'. In the 'Add Help Text' using the formatting as follows: <?format-Date:P_TO_DATE1;MM/YYYY?>. This seems to send the date parameter '1-Jun-12' as 'Jun-12'. But when it opens in excel, Excel assigns the cell 'Custom' format and type as 'd-mmm-yy' instead of 'mmm-yy'. So the final output still comes in DD-MON-YY format.
    I have tried changing the type to 'DATE' and date format to 'MMM-yy' in the 'Text Form Field' option. But still the excel custom format is overriding the final output.
    Any suggestions?
    Thanks
    Z

    Hi Alex,
    I used the following code in the 'Form field help Text': <?xdoxslt:format_date(P_FROM_DATE1,'MMM-yy','yyyy-MM-dd', 'en-us', $_XDOTIMEZONE)?>
    Then I wrote some letters immediately after that and ran the report. When I opened it in excel, Excel assigned format category as 'General' to the output cell. So the output now comes as desired format as 'Jan-12XYZ'.
    So it seems, if there will be some additional characters after the dates, then excel does not auto reformat the XML output to the custom date category.
    Now the big question; How to do it without the trailing characters i.e. 'XYZ' in the above output. If I remove them, then Excel will again try to custom format the date. I read soemwhere that blank space can be used to append but am not sure how it will be in the code.
    By the way in the 'text Form Field Options' I am using type as 'Regular Text'.
    Appreciate any help.
    Thanks
    Z

  • Date Format in CSV & Excel

    Hi,
    I have a search result which has some date columns and have a button to export these results to CSV file.
    The database column is of datatype VARCHAR but date is stored in it and displayed, so while fetching data from there we are converting it to date in format DD-MON-YYYY.
    while displaying the search results, its working perfectly fine.
    When downloaded to CSV file, and Opened with Any Text Editor other than Excel, the date format is proper as in screen ie. DD-MON-YYYY
    But, once we open the CSV in excel update few columns and save the file, the date gets saved in the DD-MON-YY format.
    Since this file will be uploaded back to the application, we can either design our recieving application to expect date in DD-MON-YY format. But is there anything that we can do to have it maintained in DD-MON-YYYY format itself ?

    Can any one please help me out. Iam in need of a labview code which has a excel sheet consists of 
    3 columns
    1) DATE  
    2) TIME
    3) TEMPERATURE value.
    If a string is entered as a input and that string should be compared with the Names under DATE AND TIME column in the excel sheet and if the string entered matches with any of the string under the DATE AND TIME column then it should pass one output
    1) The value of that string 
    For example if Iam entering the i/p as 10/7/2012  03:55:05 PM then it should search the strings under DATE AND TIME tab and if row 8 as the 10/7/2012  03:55:05 PM string with a value of  461.106 then it should return two o/p's one as 461.106  
    If the entered string is not matched  with any of the strings under DATE AND TIME coulmn it should return an output as zero.
    i am attaching a excel sheet screen shot which is in csv format
    Thank You
    Attachments:
    excel in csv.docx ‏190 KB

Maybe you are looking for

  • ATV3 not using optical audio with mirroring

    MacBook Pro to the Apple TV mirroring works fine for video but not audio.  The audio is from the TV speakers with mirroring but the ATV is connected to my amp and speakers via the optical audio output on the ATV3.  The ATV outputs to the amp / tuner

  • Can we change Condition Tables

    Dear Experts, can you please tell me can we change condition tables for SD example 017/018? T code for this is M/04 Requirement is now i need to check the checkbox With Release Status.. Can anybody help me? Sachin Edited by: Sachin Bidkar on Aug 12,

  • HTML bullet list not rendering in Muse

    When inserting HTML like this, Muse is not rendering bullet points: <ul>   <li>Bullet 1</li>   <li>Bullet 2</li>   <li>Bullet 3</li> </ul> What do I miss here? Thanks. Paul

  • BPEL on Eclipse 3.1

    Hi, Do you know if BPEL is supposed to run on Eclipse 3.1? If not, is there an intention to support it? Thanks Simon

  • Getting TMachine to backup files on a separate external HD

    Hi all, Thanks for the help on this. I have managed to get time machine to backup all of the files on my main Macintosh HD on my MBP. However, I keep my music on a separate external HD and want to try and get it to also backup these. I have made sure