Export to Excel formating problem

I am having a problem with the formatting of a an export file
to Excel, which is created by a Coldfusion page. My export file
contains numbers that need to be formatted as text. I found the
style code below on this forum, but I am not having any luck with
it. I tried adding it to my style file or directly as style
formatting on the export page, but neither one of the two are
getting recognized.
Is there anything else I need to code before this works? Your
help is greatly appreciated. Thanks,
Rose
<html>
<STYLE TYPE="text/css">
TD {
mso-number-format:\@;
</style><body>
<!---<cfheader name="Content-Disposition"
value="inline; filename=Exportdata1.xls">--->
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="inline;
filename=export.xls">
<cfquery name = "getclub" datasource="#DSN#">
Select mail_name name,…
</cfquery>
<table width="200" border="2">
<cfoutput query='getclub'> <tr>
<td>#customer#</td>
<td>#dateformat(begin_date,'mm/dd/yyyy')# -
#dateformat(end_date,'mm/dd/yyyy')#</td>
</tr></cfoutput>
</table>

Could it be a case sensitivity issue? I also noticed that you
are missing a <head> tag pair, and that your date range field
is not actually numeric. I doubt that excel is that delicate when
it comes to those issues, but you might try:
<html><head>
<STYLE TYPE="text/css">
TD.number {
mso-number-format:\@;
</style></head><body>
<cfcontent type="application/vnd.msexcel">
<cfheader name="Content-Disposition" value="inline;
filename=export.xls">
<cfquery name = "getclub" datasource="#DSN#">
Select mail_name name,…
</cfquery>
<table width="200" border="2">
<cfoutput query='getclub'> <tr>
<td class="number">#customer#</td>
<td>#dateformat(begin_date,'mm/dd/yyyy')# -
#dateformat(end_date,'mm/dd/yyyy')#</td>
</tr></cfoutput>
</table>
</body>
</html>

Similar Messages

  • FR Studio: HTML export to Excel formatting problem

    Hey,
    I am having trouble with the formatting when exporting from FR Studio to Excel.
    I have a report with 2 seperate grids. In HTML and PDF format it looks very neat. But when I export it to Excel, the bottom grid changes its format and some cells have weird colours and borders appear out of nowhere and make it look very ugly. Is there a way to solve this? I have tried many different things including changing cell borders and deleting entire grid and putting in a new one.
    Can anyone help me?
    Thanks!
    Samantha

    one can never have control on formatting of exported excel.
    At max what can you do is- try different different colors, which look nice in html, pdf as well as excel.
    Thanks,
    Rahul

  • Export to Excel - Macro problems

    I have moved this to the Discoverer forum. Exporting to Excel - Macro Problems
    Message was edited by:
    user385142

    Hello Denes.
    Excuse me for send you a message in this way , but I dont find other way to contact with you.
    Im using the export_excel_pkg, and really it work good.
    I have only one problem, I tell you.
    When, in one item, data is very long and numeric, by example a EAN code, without any class of format, by default it give me the value ###, Im studing the package and trying to resolve this, but if you can send me any idea it can help me a lot.
    Thanks in advanced.
    You are doing a great work for us.

  • Status gui &XXL (export to excel format)command doesnu00B4t work

    hi gurus i copied the standar GUI menu from SAPLKKBL and every thing its ok except the &XXL (export to excel format)command .
    i push this button and nothing happens. The popup doesn appear what is wrong? i have excel in my pc and when i use the %PC
    command it works fine and converts to excel but i need the mmhtml format so i need the &XXL command works . any idea?

    IM DOING SOME TEST I CHANGE THE TYPE OF ALV AND IT WORKS, BUT I NEED TO USE THE REUSE_ALV_BLOCK_LIST_DISPLAY AND THE PROBLEM IS WITH THIS TYPE OF ALV
    Moderator message - Please do not use all caps!
    Edited by: Rob Burbank on Sep 27, 2010 5:25 PM

  • How can I schedule an export to excel format of an OBIEE Analysis or Dashboard to a local directory ?

    Hello,
    I would like to schedule with an agent some reports in OBIEE 11g that must be exported in excel format to a specific local directory.
    There is a need for a group of OBIEE users to have a set of reports ready (exported in .xlsx) every morning.
    Furthermore, if the previous scenario is possible then could I deliver a whole OBIEE Dashboard with the same way?
    Any input will be appreciated.
    Thank you in advance.

    Hi,
    As of now , we are not able to save the report in shared location in Linux /Unix.
    Windows it is possible.
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-vb-scripts-to.html
    http://satyaobieesolutions.blogspot.com/2013/03/oracle-bi-ee-11g-calling-js-scripts-how.html
    Thanks,
    Satya Ranki Reddy

  • Reports exported to Excel - Formatting issues

    We have two Business Objects Enterprise servers (boxi r2 and boxi r3.1 sp3) running side by side.  We find that reports created using boxi r2 and exported to Excel format look fine.  When we run the same report and export to excel using boxi r3.1 sp3, we encounter the following formatting issues:
    <ol>
    <li>All columns do not fit on pages.  The last 2 to 3 columns spill over onto extra pages.</li>
    <li>There are some columns where most of the values are blank, but when a row is exported that has a value in that column, all subsequent column positions for that row shift.</li>
    <li>All rows do not fit on page.  The last two rows flow onto a new page, then there seems to be a page break.</li>
    <li>On some reports dates are displayed as ######.</li>
    <li>On some reports column headings are  not centered.</li>
    <li>I would appreciate any input that would help us determine a fix for the formatting issues we are encountering.</li>
    </ol>
    The report is executed using CrystalDecisions.CrystalReports.Engine.
    Here is the code from the application that does the export:
                                ExportOptions exportOptions = new ExportOptions();
                                exportOptions.ExportFormatType = ExportFormatType.Excel;
                                exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                                DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
                                diskOptions.DiskFileName = filename + ".xls";;
                                exportOptions.ExportDestinationOptions = diskOptions;
                                ExcelFormatOptions XLOptions = new ExcelFormatOptions();
                                XLOptions.ExportPageBreaksForEachPage = true;
                                XLOptions.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;                           
                                exportOptions.ExportFormatOptions = XLOptions;
                                rptDoc.Export(exportOptions);
    Please note the following details about our environment:
    <h5>Report Designers:</h5>CR Designer version:  xi Rel 2
    <h5>Developer environment</h5>Has the following installed:
    - Business Objects Enterprise XI Release 2
    - VS .Net  2008
    - Crystal reports Basic for Visual Studio 2008
    - Crystal Report 2008 Runtime SP3
    - Boxi .Net SDK
    - SAP BusinessObjects Enterprise XI 3.1 Client Tools sp3
    - .Net Version:  2.0
    <h5>Crystal Server environment:</h5>Two clustered  Business Objects Enterprise servers with the following installed & configured
    - Business Objects Enterprise XI Release 2
    - Crystal Reports XI Release 2
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0
    <h5>Web Servers:</h5>Two load balanced web servers with the following installed and configured
    - Business Objects Enterprise XI Release 2
    - Crystal Report 2008 Runtime SP3
    - Crystal Reports XI Release 2 .Net 2005 Server
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0

    Umm, the code you provided has nothing to do with Business Objects Enterprise...(?). So, I'm a bit confused by the mention of BOE and "The report is executed using CrystalDecisions.CrystalReports.Engine" in essentially one paragraph.
    Can you pls explain?
    - Ludek

  • Export to Excel Formating Option Problem

    Hi all!
    I create a Crystal Reports.when i export to Excel File in a winform app,there has the 'Create page breaks for each page' option,but in asp.net web page.there is only two option,and not include the 'Create page breaks for each page' .I excpet the Excel File was page breaked.
    has any ideas?
    Thanks!
    Ray

    You can use the ExcelFormatOptions to specify what you want the export to look like.
    Look for it here:
    [http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]
    You can also set up the reports export options that you want to always be used by opening the report in Crystal and going to File|Export|Report Export Options.
    I am not sure about the 2nd question.  You will want to create a new thread for that and someone else may know the answer.  Can you do it when you export it from Crystal Reports? If not, then you won't be able to do it from your application.

  • Export to excel formatting

    I'm working on a quote report which has narrative sections as well as a table. I can get the report to look great in the application but it has formatting problems once exported to excel.
    In one of my narrative reports I have a simple table with a few columns. Once exported to excel the first narrative column is the entire width of the report table below it. The large cell row is also merged cells in excel.
    Is there anything that can be done to help force how the report goes into excel?
    I have also tried creating the report in a narrative html table to export into excel.

    Can someone explain if they face similar issues as I am when you export a report output on portal to Excel it takes huge size. I assume it because of all the color formatting etc. but is there a way to reduce this size. 3.5 Bex Analyzer same report takes only 3 MB while if I export it from portals it takes 32 MB.

  • Export to excel - Formatting issue - OBIEE 11.1.1.5

    Hi All,
    When an analysis is exported to Excel, some of the values are showing some strange behaviour i.e. some values are multiplied by some huge number as you can see in the excel screenshot below.
    BI Analysis Screenshot:
    http://i44.tinypic.com/331eopf.jpg
    Excel Screenshot:
    http://i44.tinypic.com/34snqko.jpg
    Is this BI issue or an Excel setup issue? And how to fix it?
    Thanks in advance.

    Hi,
    We too faced the similar issue.
    We tried ROUND function and it was coming with proper formatting.
    Try and let me know further.
    Regards,
    MuRam
    NOTE: Please mention if this resolved your problem/still facing and close the thread to assist others with similar problems.

  • CUIC 803 does not export to Excel format.

      I'm trying to export real-time and historical report to Excel format in
    my lab environment with no sucess. When I click export button, I receive
    "error on page" message.
      Does anybody here got same problem?
    Any sugestion?

    it is a bug on CUIC with bug ID CSCtq42407 for more information see below link
    http://www.cisco.com/en/US/products/ps9755/products_tech_note09186a0080b8f108.shtml

  • Crystal reports 13.5 : Export to excel formatting

    Hi. We are developing web application using VS 2010. We are using crystal reports 13. Initially we had VB6 application which used crystal reports 8.5. The format for excel report generated by crystal report 8.5 and crystal report 13.5 is different. We are using the export option in crystal report viewer for both reports. Is there any way in which we could make changes to crystal reports 13.5 to achieve similar excel formatting as crystal reports 8.5.

    Hi Pooja,
    Back in CR 8.5, it was the RDC COm SDK (CRAXDRT.dll) and with CR for VS 2010 it is .NET SDK which are two complete different SDKs and could not be compared.
    However, the .NET SDK should export the report same as it is exported through CR designer.
    Could you export the report in a newer designer possibly CR 2008 or CR 2011/2013 and compare the exported output with your .NET SDK export?
    You could get the trial free download for CR desiner here.
    http://www.sap.com/solution/sme/software/free-trials.html
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • WAD report export to excel formatting not preserved

    Hi,
    when i export BI 7.1 WAD template to excel and copy to another excel sheet cell formatting changes.color formatting is
    not preserved when we copy to another excel sheet.I tried resetting the "preserve visual appearance of workbook" to the
    exported excel sheet, but this didnot work.I am using excel 2007.
    Can anyone tell me how to preserve the excel formatting for WAD template.
    Thanks,
    Harsha

    Hi Roy
    Have you got the report set to bring back a specific number of rows at a time (ie retrieve data incrementally in sets of : setting in options)?
    If so set this to a larger number of rows, Discoverer will then return all data when the reports is run and will export all data to the spreadsheet.
    Hope this helps
    Melanie

  • Export to Excel Formatting Lost

    I've got a CR designed such that the report prints out a separate page for each grouping of data bay a certain data field.
    The Crystal format and PDF format look beautiful and the paging is perfect.  Yet when I export to Excel it all runs together and does not page correctly at all.  Plus the formatting is totally screwed.
    Is there a secret to getting the Excel export to behave as the report was written? 
    TIA
    Harry

    <<What version of CR?>>
    11.0.0.1830
    <<What CR SP has been applied?>>
    unknown
    <<Is this in an app?*>>
    The call to create the report is in an app.  Uses CrystalDecisions.CrystalReports.Engine
    CrystalX.RptUtils.GenerateCrystalReport(mDbx, argReportName, argParms, argOutputType)
    Select Case piStrFormat
                    Case "Crystal"
                        tOk = ExportToCrystal(tReportDoc)
                    Case "Excel"
                        tOk = ExportAndView(tExportFolder, tReportDoc, piStrCrystalReportName, "XLS", CrystalDecisions.[Shared].ExportFormatType.Excel)
                    Case "PDF"
                        tOk = ExportAndView(tExportFolder, tReportDoc, piStrCrystalReportName, "PDF", CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
    <<If an app, what SDK are you using?>>
    CrystalDecisions.CrystalReports.Engine
    10.2.3600.0  Crystal Reports for .NET Framework 2.0
    <<If you are using .NET, what version?>>
    Microsoft Visual Studio 2005  Team Suite
    Version 8.0.50727.762 (SP.050727-7600) SP2
    <<If the report was created in a stand-alone version of CR, how is the export there?>>
    the report is created in CR v11.0.0.1830 above and uses a stored procedure for the datasource for the fields
    <<"formatting is totally screwed" - a link to a screen shot would help. "Screwed" is not particularly descriptive(?)...>>
    You're right that really doesn't tell you much. 
    The formatting is probably fine for it being an Excel file. Whereas the Crystal viewer and the PDF viewer isolate each page from the other, the Excel has the pages on same screen by its very nature. 
    I think what I may have to do is create another report that basically creates a separate Excel file for each grouping.  I've got screen shots but the content is NDA cept I could pobably zip and send to your email if that's possible or a ftp site......Can the Crystal Report detect Excel export and if so create as many Excel files as groupings?

  • Exporting to Excel - Macro Problems

    For reasons unknown to us, when we export our crosstab reports from Discoverer 4i to Excel(2000 or 2003), we are getting a dialog message box warning us of the following, "The document you are opening contains macros. Some macros may contain harmful viruses. If you are sure this document is from a trusted source, Click Yes. If you are not sure and want to prevent any macros from running, click No." If we click Yes, then it will download two sheets, the first complete with drop down boxes etc and the second sheet just contains the regular crosstab report that we used to get but with formatting included, aka grey shaded columns etc. We checked the ExcelExportWithMacros pref and it is set to 0, the macro security on Excel is set to medium.
    Any ideas would be welcome.
    Thank you

    The macro warning is something that's well known when exporting to Excel. Just for grins, try putting your security at low to see if it still warns. There may be some kind of macro that gets sent with the export (this has been discussed before), but not really sure. However, many clients I've been at just accept it and click Yes. I believe it's a 4.x thing (ie: I hope it's been corrected in 10g), but haven't tried that yet to be sure.
    As for the export having more than one worksheet, I believe I remember that this is also a known 'challenge' (ie: it doesn't just come out like a pivot table in 1 worksheet) and again, I'm pretty sure it's only a 4.x thing.
    Also, are there 2 options for exporting to Excel for a xtab (ie: export to Microsoft Excel Workbook (.xls), Microsoft Excel Pivot Table (.xls)? If so, try each as the first is for static sheet only info and the latter exports a 'static sheet', a 'pivot table' and 'warning sheet'.
    Also see metalink doc: 214075.1 for one possibility.
    Also see metalink doc: 157162.1 for another idea.
    Russ

  • Help Regarding Exporting to Excel format Crystal Report XI SP5

    I am trying to export a report in MSExcel format but when i do so it gives me an error that the following export format is not supported or recognized ......
    I am able to export into PDF, RTF and CSV (Server Side Only) formats .
    Here is the code i am using provided on the business objects help site :
    <%
         // Working for all but exporting to Excel and Text
         IReportSource reportSource = (IReportSource)session.getAttribute("reportSource");
         session.setAttribute("reportSource", null );
         ReportExportControl exportControl = new ReportExportControl();
         //Object reportSource = session.getAttribute("reportSource");
         System.out.println(exportControl.getName());
        exportControl.setReportSource(reportSource);
        ExportOptions exportOptions = new ExportOptions();
         exportControl.setExportAsAttachment(true);
         exportControl.setName("Excel");
         //exportControl.setOwnForm(true);
         //exportControl.setOwnPage(true);
         String selectedFormat = "2";
         if(selectedFormat.equals("0")/Crystal Report/){
              exportOptions.setExportFormatType(ReportExportFormat.crystalReports);
         else if(selectedFormat.equals("1")/Word/){
                   exportOptions.setExportFormatType(ReportExportFormat.MSWord);
         else if(selectedFormat.equals("2")/Excel/){
                   exportOptions.setExportFormatType(ReportExportFormat.MSExcel);
         else if(selectedFormat.equals("3")/Rich Text Format/){
                   exportOptions.setExportFormatType(ReportExportFormat.RTF);
         else if(selectedFormat.equals("5")/PDF/){
                   exportOptions.setExportFormatType(ReportExportFormat.PDF);
         else if(selectedFormat.equals("6")/Excel without formatting/){
                   exportOptions.setExportFormatType(ReportExportFormat.recordToMSExcel);
         else if(selectedFormat.equals("7")/Text/){
                   exportOptions.setExportFormatType(ReportExportFormat.text);
         else if(selectedFormat.equals("8")/editable RTF/){
                   exportOptions.setExportFormatType(ReportExportFormat.editableRTF);
         else if(selectedFormat.equals("9")/Server Side CSV/){
                   ReportClientDocument reportClientDoc = (ReportClientDocument)session.getAttribute("rptDoc");
                   PrintOutputController printOutputController = reportClientDoc.getPrintOutputController();
                   ByteArrayInputStream byteIS = (ByteArrayInputStream) printOutputController.export(ReportExportFormat.characterSeparatedValues);
                 byte[] buf = new byte[2000 * 1024];
                 int nRead = 0;
                 response.reset();
                 response.setHeader("content-disposition", "inline;filename=example.csv");
                 response.setContentType("application/csv");
                 while ((nRead = byteIS.read(buf)) != -1) {
                     response.getOutputStream().write(buf, 0, nRead);
                 response.getOutputStream().flush();
                 response.getOutputStream().close();
        if (!selectedFormat.equals("9")/Don't use the export control for CSV/){
                   exportControl.setExportOptions(exportOptions);
                   Fields parameterFields = (Fields)session.getAttribute("parameterFields");
                   exportControl.setParameterFields(parameterFields);
                   ConnectionInfos oConnectionInfos = (ConnectionInfos)session.getAttribute("oConnectionInfos");          exportControl.setDatabaseLogonInfos(oConnectionInfos);
            exportControl.processHttpRequest(request, response, getServletContext(), null); //getServletConfig().getServletContext()
           // exportControl.dispose();
    %>
    And if it isn't possible to export to excel then how can i isolate the report/page header sections in CSV format so that i can atleast get headings in the CSV file ..
    Please help me out with This as i am stuck on this for some time now !!

    Only if you export to OfficeHTML or OfficeMHTML and then open with Excel
    Wayne Van Sluys
    TopDown Consulting

Maybe you are looking for

  • Abap Import Error - ERROR: DbSlErrorMsg rc = 29

    Hi All, Iam installing erp 6 ehp 7 in windows platform. Iam getting an error in Import Abap step.  Please find the attached logs.  See trans.log as below. 4 ETW000 R3trans version 6.24 (release 741 - 04.02.14 - 20:14:02 ). 4 ETW000 unicode enabled ve

  • Change to RSViewerPage.aspx doesn't reflect the change to the Sharepoint

    I am trying to update RSViewer.aspx file under -15/TEMPLATE/LAYOUTS/ReportServer. It seems like the changes I made isn't reflected on the sharepoint. Please let me know if you can give any suggestion to make this work. Note: I have made same changes

  • Annually increased resource rates

    An interesting problem has just arisen. We use fully resourced and costed programmes using P6R8 and I have just come across this. Our resource charge out rate changes every 1st April so I have added effective dates and correct resource charge out rat

  • Software updates not completing

    Hi I have tried for the last couple of months now to update software via Software update. it never completes the update, always says that the image could not be created or something in those lines. Some of the programs like iTunes have updated themse

  • Why won't my mozilla thunderbird open

    hello, my mozilla thunderbird does not open, I've tried everythink I can think of but it just won't open, does anyone else have this problem or have any ideas on how to open it?????