Forum Stats

  • 3,851,482 Users
  • 2,263,987 Discussions
  • 7,904,735 Comments

Discussions

Download to excel issue

Hi,

When I click on "Download to Excel" on a report, the confirmation window which pops up shows the type of the document as MHTML instead of xls. When I click on Open, I get the data in the form of images in a browser page instead of data in an excel spreadsheet.

Kindly advise what could be the reason for this behaviour and how to resolve the same. I am using OBIEE 10.1.3.4 and MS Office version on my machine is 2007. I've implemented SSO on apache tomcat.

Regards,
Vahib
Tagged:
«1

Answers

  • rmoff
    rmoff Member Posts: 2,511
    Does this help? http://oraclebiblog.blogspot.com/2009/06/configuring-user-interface-behavior-in.html
  • vahibg
    vahibg Member Posts: 84
    Thank you for the link. The blog surely was informative.

    However, in my case, even the "Download to Excel 2000" does not produce desirable results. Even that option downloads data as html, so the workaround suggested in the blog did not apply. Any other thoughts?
  • RickGrieve-Oracle
    RickGrieve-Oracle Member Posts: 98 Employee
    Download to Excel generates an excel file which is in MHTML format and this format is supported by MS Office 2002 and above.
    MS Office 2000 and older do not support the mhtml format. I'm not sure if OpenOffice supports it though.
  • vahibg
    vahibg Member Posts: 84
    Interestingly, when I do a "Download to Excel" in OBIEE 10.1.3.3, the data from the report is downloaded in an excel file. But when I use this option in OBIEE 10.1.3.4, it gives me the data in html. We recently upgraded from 10.1.3.3 to 10.1.3.4 and since then the users are not able to download data in spreadsheets the way they were able to do with the earlier version.
  • RickGrieve-Oracle
    RickGrieve-Oracle Member Posts: 98 Employee
    The idea is that Download to Excel will give you the xml version (mhtml) which will open in later version of MS office, and the Download to Excel 2000 will give you a spreadsheet that opens in Excel 2000. I'll check the archives for more info on this...
  • RickGrieve-Oracle
    RickGrieve-Oracle Member Posts: 98 Employee
    Ok - I think I've solved this one for you...

    When you download to excel you get a mhtml file saved to the file system. If you open this in Windows it will default to opening it in a web browser because it thinks it is an html file. To test it opens in Excel, run excel, choose open file, and select the file.

    To change this going forward open Windows explorer, choose Tools->Folder Options and then select File Types tab. Scroll down till you see MHTML and you'll see it is associated to a web browser (eg internet explorer). Change this to open Excel. Now you can select the file as before and it will launch excel.
    RickGrieve-Oracle
  • RickGrieve-Oracle
    RickGrieve-Oracle Member Posts: 98 Employee
    Let me know if this solved your Download to Excel problem :)
  • vahibg
    vahibg Member Posts: 84
    Thanks for your response Rick.

    I get an error when I try to save the file on my computer. In other words when i do a download, i can only Open a file but am not able to Save it on disk. I also made changes you suggested by linking .mht and .mhtml files with MS Excel but still these files are being opened in web browser.

    In order to analyse the problem further, I disabled SSO and logged in as administrator. The "Download to Excel" link worked perfectly fine. The table data was neatly downloaded in an excel spreadsheet. This goes to prove that the issue has something to do with SSO setup. Coincidentally, some user had posted a similar issue on this forum sometime back and he did not get a solution here. He too had concluded that the download issue was related to SSO. I'd appreciate if you can throw some more light on this.
  • RickGrieve-Oracle
    RickGrieve-Oracle Member Posts: 98 Employee
    Checking the Oracle bug database there are the following bugs/enhancements logged that sounds relevant and some workarounds we can try:

    Bug 865450 DOWNLOAD TO EXCEL ALWAYS OPENS AS HTML FILE
    Bug 5592823 EXCEL DOWNLOAD TREATED AS HTML FILE BY MOZILLA FIREFOX 1.5
    Enh 6906146 DOWNLOAD TO EXCEL 2000 OUTPUT SHOULD BE EXCEL FORMAT NOT HTML

    Workarounds:

    (1) If your server is Tomcat
    (From bug log...)
    The real issue is IE fails to to detect the file type correctly in some cases
    in absence of proper MIME headers from the Tomcat servers especially on
    Linux.
    The fix is to
    Add a mime-mapping in tomcat/conf/web.xml. Under the section
    Default MIME Type Mappings
    Restart tomcat and delete temporary internet files from IE
    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/octet-stream</mime-type>
    </mime-mapping>


    (2) Switch browser to Firefox instead of IE. This sounds drastic but reading the bug logs it appears that Firefox will ask you what to use to open the file the first time it is used via Download to Excel - and at this point you can choose Excel and ask it to remember that decision.

    Let me know if any of this useful. If not I'll drill further and see if I can dig up a better workaround.
  • vahibg
    vahibg Member Posts: 84
    Thanks Rick. The 2nd solution you suggested works for me but unfortunately it is not acceptable to users. As per company policy, we cannot use any other browser apart from IE.

    The 1st solution you suggested didnt work for me. Following code already existed in web.xml

    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>

    In the first attempt, I added the snippet you provided alongwith this snippet and restarted services, it didnt work. So in the next attempt, I commented out this snippet and used only the one you provided, that didnt work either. Please let me know if you come across any other workaround.
This discussion has been closed.