Easily import and export content to and from XWiki

16 Oct 2019 5 min read

 

When weighing the pros and cons of using new software, a major concern is the existing information:
What will I do with my current data?
Can I migrate all my data to the new system?
Can I export my data if I need to?

You need to be able to import existing content to the wiki, but also export content as the need arises. One of the main advantages of Open Source is that you can easily export your content and avoid vendor lock-in.

We often receive questions about how exports and imports work in XWiki, so we thought it would be a good idea to cover the basics in a blog post.

Export content

Export XWiki pages

As a user, you can decide to export a single wiki page, a set of wiki pages or your whole wiki.

When doing an export, XWiki pages are saved using the XAR format. A typical XAR created when doing an export from the XWiki Administration will include all the pages on your XWiki instance. In our upcoming release, we are excited to be introducing the ability to do selective exports natively.

exportwiki.png

Other types of export

If you’d like to export a single page as a XAR, you need to go to that particular page and click “Export” from the “More actions” menu. For pages, you also have the ability to do exports to PDF, ODT, RTF and HTML formats.

Import content

There are several types of imports that can be done inside XWiki:

  • Importing XWiki pages (XAR format)
  • Importing Office documents and converting them to wiki pages
  • Importing content from other wikis
  • Importing other types of data (Microsoft Excel, CSV, etc.)

Importing XWiki pages

Importing pages is particularly useful when you’re looking to migrate from an existing XWiki to another. You can import XWiki pages very easily, from the Administration. You should attempt to import only the content, so you don't overwrite XWiki standard pages and break the wiki. After doing the import you should perform some tests to confirm that the wiki works as expected.

importpage.png

Importing Office documents

Currently, a lot of enterprise data is stored in Microsoft formats (Word, Excel, PowerPoint). XWiki has the ability to import these documents and convert them into wiki pages. This feature is exposed in two locations: when you create a new page and from the WYSIWYG editor.

Several outputs will be generated depending on the original document format:

> If the file is a Word document (.doc, .odt, etc.) the result will be a standard wiki page with text, images, tables, etc.
> When the file is an Excel document (.xls, ods, etc.) the result will be a wiki page with a table.
> For files that are PowerPoint (.ppt, .odp, etc.) each slide of the presentation will become an image. The images will be attached to the wiki page and displayed using a gallery macro.

As you’re trying to work with your existing documents, you might also find the following apps useful:

  • Office365: allows you to embed an Office 365 document by URL and search for office documents from OneDrive inside XWiki.
  • Only Office Connector: you can create and edit doc/docx, xls/xlsx, pps/ppsx attachments using an OnlyOffice server. Users can edit the same document in real-time.
  • Google Docs Integration: allows you to integrate XWiki with Google's editing application.

In XWiki, you can also do complex imports. We can assist you with importing content from other wikis.

We hope this short summary was useful. If you have any questions about importing and exporting content to and from XWiki, don’t hesitate to get in touch.

You may also be interested in: