4 Replies Latest reply: Jan 3, 2013 5:00 AM by Arnaud Geslin RSS

    opening Office2010 files with Oracle Portal (10g)

    Arnaud Geslin
      Hello

      We face a problem with IE8 opening some office 2010 files (.docx, .xlsx etc). They are seen a zipped files (wich they are, in fact) instead of Word or Excel files, thus the browser only proposes to download them on disk and not to see them in the Office application.

      I thnik the solution is to add thoses mime types in the Portal stuff, but where ?

      application/vnd.ms-word.document.macroEnabled.12 .docm
      application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
      application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
      application/vnd.ms-powerpoint.template.macroEnabled.12 potm
      application/vnd.openxmlformats-officedocument.presentationml.template potx
      application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
      application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
      application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
      application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
      application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
      application/vnd.ms-excel.addin.macroEnabled.12 xlam
      application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
      application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
      application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
      application/vnd.ms-excel.template.macroEnabled.12 xltm
      application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
        • 1. Re: opening Office2010 files with Oracle Portal (10g)
          Erik Janssen-Oracle
          Oracle Portal 10g doesn't support Office 2010 files. The recommended way forward is to use Oracle Portal 11g with a database version which supports filtering and indexing for Office 2007+ files.

          Check MOS note [url https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1377493.1]1377493.1, 'How to Add New Mime Type for MS Office 2010 In Portal?' for more info.

          Thanks,
          EJ
          • 2. Re: opening Office2010 files with Oracle Portal (10g)
            Arnaud Geslin
            Hi Erik

            Thanks for your answer. Unfortunatly we do not plan to upgrade to 11g :(
            We don't especially need Oracle Text indexing on those 2010 files, our main aim is to be able to upload/download thoses files correctly. I guess this is possible anyway, maybe by modifying directly the httpd.conf or other Apache file, or adding some data in PORTAL schema tables.
            • 3. Re: opening Office2010 files with Oracle Portal (10g)
              Erik Janssen-Oracle
              Hi Arnaud,

              You may want to check the solutions for Office 2007 in Portal 10.1.4.2, see document [url https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=788629.1]788629.1. Have not tried the solution yet but it may work with Office 2010 as well.

              Thanks,
              EJ
              • 4. Re: opening Office2010 files with Oracle Portal (10g)
                Arnaud Geslin
                Hi Erik

                Unless we can upgrade to 11g, I :
                - added the Office types in Apache/Apache/mime.types
                - added an BI/BU trigger on portal.wwdoc_document$ to detect file type and modify mime_type.

                I noticed in the relateds notes you told that our portal wont be able to index thoses 2010 files because it needs at least Portal 10.1.4.2 and a 10.cant_remember Oracle DB, but we at least can download correctly the files, that's a good point.

                Indeed the issue was coming from IE8 that does not handle correclty thoses file extensions (a bit surprising, coming from a MS product) but this workaround works fine as not all our users can easily upgrade to IE9+

                Regards
                Arnaud


                ------------------------

                CREATE OR REPLACE TRIGGER TRIGG_BI_BU_WWDOC
                BEFORE INSERT OR UPDATE
                ON WWDOC_DOCUMENT$
                REFERENCING NEW AS New OLD AS Old
                FOR EACH ROW
                BEGIN

                If :new.mime_type in ('application/octet-stream', 'text/plain') then

                Case
                When upper(:new.name) like '%.DOCX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
                When upper(:new.name) like '%.PPTX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
                When upper(:new.name) like '%.XLSX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
                When upper(:new.name) like '%.DOCM' then :new.mime_type := 'application/vnd.ms-word.document.macroEnabled.12';
                When upper(:new.name) like '%.DOTX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.wordprocessingml.template';
                When upper(:new.name) like '%.POTM' then :new.mime_type := 'application/vnd.ms-powerpoint.template.macroEnabled.12';
                When upper(:new.name) like '%.POTX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.presentationml.template';
                When upper(:new.name) like '%.PPAM' then :new.mime_type := 'application/vnd.ms-powerpoint.addin.macroEnabled.12';
                When upper(:new.name) like '%.PPSM' then :new.mime_type := 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12';
                When upper(:new.name) like '%.PPSX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.presentationml.slideshow';
                When upper(:new.name) like '%.PPTM' then :new.mime_type := 'application/vnd.ms-powerpoint.presentation.macroEnabled.12';
                When upper(:new.name) like '%.XLAM' then :new.mime_type := 'application/vnd.ms-excel.addin.macroEnabled.12';
                When upper(:new.name) like '%.XLSB' then :new.mime_type := 'application/vnd.ms-excel.sheet.binary.macroEnabled.12';
                When upper(:new.name) like '%.XLSM' then :new.mime_type := 'application/vnd.ms-excel.sheet.macroEnabled.12';
                When upper(:new.name) like '%.XLTM' then :new.mime_type := 'application/vnd.ms-excel.template.macroEnabled.12';
                When upper(:new.name) like '%.XLTX' then :new.mime_type := 'application/vnd.openxmlformats-officedocument.spreadsheetml.template';
                Else Null;
                End Case;

                End If;


                EXCEPTION
                WHEN OTHERS THEN
                -- Consider logging the error and then re-raise
                RAISE;
                END TRIGG_BI_BU_WWDOC;
                /

                Edited by: Arnaud Geslin on Jan 3, 2013 12:00 PM