Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Read an Excel file when it is added to a document library - Not able to parse in ItemAdding Event Nor Validate in Item Added Event

$
0
0

Hi ,

I have a requirement where I have to validate an Excel file on upload to SharePoint Document library.

Validation : Parse through the excel and check if a excel column is Null

I wrote a Item Adding Event handler for validating the document which is being added , but the issue here is I cant pass the document for reading as it is not yet uploaded. So I cant validate when it is in Item Adding.

In Item Added Event Handler I am able to pass the document Inteop.Excel.App Object for reading , But I cant cancel the event triggered using properties.Cancel and delete the file if it fails the validation.

How can I parse the excel and validate the excel when it is getting uploaded to Document library.

Thanks in Advance,

Pallavi


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>