SharePoint 2010 is an excellent document management system, which can also be used as intranet. In some cases, organizations may want something simpler to manage content yet need to link to elements of more sophisticated content held in documents, which may well be located in SharePoint. The easiest means to do this at a very basic level is to use the ReST protocol to pick up images, such as Charts in this example, which may probably be most conveniently hosted in Excel files.

The file below is held in a document library in SharePoint 2010 and updated by users via the browser.

Figures can be edited simply and the chart can be kept up to date.

Once the file is saved, (in this case, each cell edit in Excel is a save action), then the Chart will reflect the changed data.

 

In order to use the chart in an external content management system such as Drupal, the chart needs to be inserted as an image tag in a Drupal page as follows:

<img src=”http://win-sqpsjc4uhjv/sites/drupal/_vti_bin/ExcelRest.aspx/rest/Book1.xlsx/Model/Charts(‘Chart%201&#8217;)”>

The text format in Drupal must be set to Full HTML as follows:

The Chart image will then be displayed directly in the Drupal page. In this simplified version, the SharePoint site hosting the Excel file has been has been set up with read-only Anonymous access enabled. In the real world a more sophisticated configuration would be required to manage authentication between Drupal and SharePoint. This will be the subject of a blog article in the near future.

 

A soon as the source changes in SharePoint, only a page refresh is required to see the current data, as follows:

 

Advertisements