Hello shola,
Yes you can use open xml in RER.
Please refer this blog to attached an RER is Hostweb>>http://blogs.msdn.com/b/kaevans/archive/2014/02/26/attaching-remote-event-receivers-to-lists-in-the-host-web.aspx
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
SPRemoteEventResult result = new SPRemoteEventResult();
switch (properties.EventType)
{
case SPRemoteEventType.AppInstalled:
HandleAppInstalled(properties);
break;
case SPRemoteEventType.AppUninstalling:
HandleAppUninstalling(properties);
break;
case SPRemoteEventType.ItemAdded:
HandleItemAdded(properties);
break;
case SPRemoteEventType.ItemUpdating:
HandleItemUpdating(properties);
break;
}
}
private void HandleItemUpdating(SPRemoteEventProperties properties)
{
using (ClientContext clientContext =
TokenHelper.CreateRemoteEventReceiverClientContext(properties))
{
if (clientContext != null)
{
try
{
List photos = clientContext.Web.Lists.GetById(
properties.ItemEventProperties.ListId);
ListItem item = photos.GetItemById(
properties.ItemEventProperties.ListItemId);
clientContext.Load(item);
clientContext.ExecuteQuery();
item["Title"] += "\n added by RER " + System.DateTime.Now.ToLongTimeString();
item.Update();
clientContext.ExecuteQuery();
Microsoft.SharePoint.Client.File file = item.File;
ClientResult<Stream> data = file.OpenBinaryStream();
// Load the Stream data for the file
clientContext.Load(file, f => f.ListItemAllFields, f => f.Name);
clientContext.ExecuteQuery();
From File you can take the file versions collection. Or you can refer Open XML and do a particular task.
If you want to perform it after item added event, you can go ahead with Process One way event.