This plugin provides the option of using the Microsoft Online Doc Viewer for previewing both MS Office and OpenOffice documents as an IResourceView
This plugin will attempt to preview the following formats
"DOC", "DOCX", "XLS", "XLSX", "PPT", "PPTX", "PPS", "ODT", "ODS", "ODP"
To install ckanext-officedocs:
Clone this repository into the place where you normally install extensions, by default this will be /usr/lib/ckan/default/src/
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-officedocs Python package into your virtual environment:
cd ckanext-officedocs python setup.py install
Add
officedocs_view
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/production.ini
).If you wish for views to be created automatically for you, then you should add
officedocs_view
to the end of theckan.views.default_views
option in your config file.ckan.views.default_views = ... officedocs_view
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload
Q: It doesn't work, my documents aren't previewing
A: For this extension to work, the documents to be previewed must be accessible to the wider internet, and will only work if you use a hostname, and not just an IP address.