Community Support for OpenDocMan (Deprecated)
Can add .xlsm, cannot check in - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Can add .xlsm, cannot check in (/thread-40.html)



Can add .xlsm, cannot check in - Stephen - 01-12-2010

spacebaby


2008-12-10 10:01:46 PST
I think I might have found a defect. I can add a file with the extension xlsm. I can check it out. However, if I try to check it back in, I get an error that the MIME type of the document is not supported.
jonathanwminer


2008-12-10 10:10:25 PST
Does your system's mimetype file (/etc/mime.types, for example) contain the definition for xlsm?
spacebaby


2008-12-10 11:29:17 PST
The config.php file contains this mime-type:

'application/msexcel'

jonathanwminer


2008-12-10 12:47:05 PST
What OS are you running?
spacebaby


2008-12-10 14:10:58 PST
Windows Server 2003

Apache 2.2.6
MySQL 5.0.45
PHP 5.2.4
jonathanwminer


2008-12-11 05:39:59 PST
(First... please reply to the right message, so future readers can see the logical flow of this conversation. Thanks!)

I have no experience with Windows. Linux, and other UNIX, systems have an /etc/mime.types file that lists the MIME types. The ODM mimetypes.php file will read this, or if it's not found use the ODM defaults. The ".xlsm" extension is not listed as an ODM default. You have two options:

Best... patch mimetypes.php to read the Windows version of /etc/mime.types. This fixes your problem, but also fixes it for all Windows users and gives some future proofing.

Almost as good... patch mimetypes.php to add ".xlsm". This also fixes your problem for all Windows users, but does offer the same future proofing.

In either case, in the spirit of OSS, please contribute your patches back to the ODM distribution.
spacebaby


2008-12-11 11:08:54 PST
I've added support for some Office 2007 document types and older MS Office document types that were not supported.

Here are the lines I added to mimetypes.php:

MS Excel prior to Office 2007:

$mimetypes['xla'] = 'application/vnd.ms-excel';
$mimetypes['xlc'] = 'application/vnd.ms-excel';
$mimetypes['xlm'] = 'application/vnd.ms-excel';
$mimetypes['xlt'] = 'application/vnd.ms-excel';
$mimetypes['xlw'] = 'application/vnd.ms-excel';

MS Excel from Office 2007:

$mimetypes['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
$mimetypes['xlsm'] = 'application/vnd.ms-excel.sheet.macroEnabled.12';
$mimetypes['xltx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.template';
$mimetypes['xltm'] = 'application/vnd.ms-excel.template.macroEnabled.12';
$mimetypes['xlsb'] = 'application/vnd.ms-excel.sheet.binary.macroEnabled.12';
$mimetypes['xlam'] = 'application/vnd.ms-excel.addin.macroEnabled.12';

MS Project prior to 2007:

$mimetypes['mpp'] = 'application/vnd.ms-project';
$mimetypes['mpc'] = 'application/vnd.ms-project';
$mimetypes['mpt'] = 'application/vnd.ms-project';
$mimetypes['mpx'] = 'application/vnd.ms-project';
$mimetypes['mpw'] = 'application/vnd.ms-project';

MS Powerpoint prior to Office 2007:

$mimetypes['pot'] = 'application/vnd.ms-powerpoint';
$mimetypes['pps'] = 'application/vnd.ms-powerpoint';
$mimetypes['ppz'] = 'application/vnd.ms-powerpoint';

MS Powerpoint from Office 2007:

$mimetypes['pptx'] = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
$mimetypes['pptm'] = 'application/vnd.ms-powerpoint.presentation.macroEnabled.12';
$mimetypes['ppsx'] = 'application/vnd.openxmlformats-officedocument.presentationml.slideshow';
$mimetypes['ppsm'] = 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12';
$mimetypes['potx'] = 'application/vnd.openxmlformats-officedocument.presentationml.template';
$mimetypes['potm'] = 'application/vnd.ms-powerpoint.template.macroEnabled.12';
$mimetypes['ppam'] = 'application/vnd.ms-powerpoint.addin.macroEnabled.12';
$mimetypes['sldx'] = 'application/vnd.openxmlformats-officedocument.presentationml.slide';
$mimetypes['sldm'] = 'application/vnd.ms-powerpoint.slide.macroEnabled.12';

MS Word from Office 2007:

$mimetypes['docx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
$mimetypes['docm'] = 'application/vnd.ms-word.document.macroEnabled.12';
$mimetypes['dotx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.template';
$mimetypes['dotm'] = 'application/vnd.ms-word.template.macroEnabled.12';

I made changes to the mime.types in the conf folder of my Apache installation to add support for the mime types I added to mimetypes.php if they were not already there. This fixed my problem.


RE: Can add .xlsm, cannot check in - pvbj_cn - 02-20-2019

Hello

Is there anybody still has similar issue. I uses the opendocman, but cannot add document with *.xlsm format, after browsing this web, I add the line as below in the file of mimetypes.php

'xlsm' => array('application/vnd.ms-excel.sheet.macroenabled.12'),

inside the array of $mimetypes = array(); as other file types.

but after that and enter the web again the issue is still there- I cannot add *.xlsm file into, the system told me

MIMETYPE: application/vnd.ms-excel.sheet.macroenabled.12 Failed

That file type is not currently supported. Please upload a document conforming to an allowed file type or have the administrator add the missing mime-type.

any suggestions from any body?