Event Handler Checking data within Excel file This is quite a complex task and will require some time and effort to create. You would need a way for the event handler to read and inspect the excel file on the server, this would require excel to be installed on the server where your custom event handler and open the file, navigate it and do whatever checking you want on the data. However, as I said, this can be complex. Once the excel file has been validated or rejected, you could then cancel the document upload, via the ItemAdding event /Staus property (https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.speventpropertiesbase.status.aspx[^]). Some sites to get you started: * Faster MS Excel Reading using Office Interop Assemblies[^] * https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel(v=office.15).aspx[^] NOTES: * The Office Interop can often be a trap for memory leaks * Follow the 'double .' rule, If its more than 1 dot, it belongs in its over variable and its own disposing! i.e
var wb = Excel.WorkSheet.Workbook;
should be:
var WorkSheet = ExcelObj.WorkSheet;
var workbook = WorkShee.WorkBook;
This allows for such things as:
workbook.Close();
workbook.Dipose();
WorkSheet.Close();
WorkSheet.Dipose();
Which will prevent a bunch of memory leaks and ensure there are not excel.exe's hanging around after your process has finsihed. Memory clean up is important when working with the office interop! NOTE: Code samples as just that, samples and are not expected to work. 2. Instant Messaging This is possible depending on what instant messaging system you use. In the past I have written such code for OCS, LCS and Lync. In essence, you woul