// you’re reading...

Best practice

Export RedDot CMS content to Excel

Very often when maintaining sites in RedDot I get to the point when it becomes necessary to change or delete content elements, e.g. the default value of an image, or an entry of an option list, etc.

But doing so on a living project can get you into big trouble if you do not first check the consequences that this action will cause!
So what can we do to get a quick overview of the status of all pages based on a certain content class (that is what we need to get an idea of these consequences)?

The thing I prefer and what I would like to share today is using the Export Instances function, which can be found in the Action Menu at “Administer Content Classes” – (CK folder) – (CK) – “Instances”.

Export your instances

  1. RedDot displays a dialog where you can enter some search criteria for the export. Though it is possible to enter nothing and to export all instances, you should fill in at least both “Instance ID” fields (from / to).
    Attention: The default value for the “max. results” field is set to 50, so set this value appropriately! Do not select “Export all Instances” (even if you exactly want to do this), for this will not work properly.
  2. Click “Start” and select an export target from the next dialog page. I prefer to export into a local folder on the RedDot server.
  3. Select all instances and click “OK”.

Every page/instance will be exported as one XML file. These files have the following structure:

<?xml version="1.0" encoding="UTF-8"?>

The type attribute indicates the kind of element (standard field: 1, image: 2, option list: 8, etc.) as documented by RedDot. Some elements may have more attributes (e.g. images).

You will receive an e-mail as soon as the export is finished.

Collect them into one XML file

Open the command prompt (”Start” – “Run…” – enter “cmd”), go to the export folder and run the following code:

type *.xml > instances.xml

Open this file with a text editor and make it well-formed XML:

  • Delete all XML declarations except for the first
  • Create an arbitrary root element
  • Double check the elements’ content for well-formedness, use CDATA sections if necessary

Regular expression experts can also delete all type=”…” attributes ;-)

Edit, use or share it

Well, that’s all. Open the file with an XML editor or import it with Excel and do whatever you like or have to…

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Stefan Buchali Stefan Buchali lives in a small village close to the Black Forest in Germany. He works as a CMS and LiveServer developer since 2000 at SF eBusiness GmbH and knows how to cope with all its depths since the time its name was Infooffice. He is winner of the silver RedDot Innovation Award 2008.


No comments for “Export RedDot CMS content to Excel”

Post a comment

Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...