Tag Info

Hot answers tagged


You need to do server side processing of this. Cannot be done in any (decent) way using client script (JavaScript). I suggest you move this feature to an Event Receiver and use the OpenXML SDK to count the words.


No, this is not possible in the SharePoint Sandbox. You can't reference other DLL's and if you used the OpenXml source code you would still get problems since it uses namespaces in .Net which are not allowed in the Sandbox.


Contrary to my original comments, I have verified that this does not work in Office 365, however it does work in On Premise SharePoint 2010 Sandbox. Anyone interested in doing this in SharePoint 2010 sandbox can take a look at my post here: http://blog.johnnybouder.com/post/2012/03/25/OpenXML-in-the-Sandbox.aspx


Now the scenario is you are trying to access the spreadsheet which is in the SharePoint Document Library. Assuming that you have path of the SpreadSheet in the document library. For an example the path of the spread sheet is http://TestSharePoint.com/sites/test/Shared%20Documents/TestExcel.xls Please check the following code: HttpWebRequest myReq ...


You're going to need to get access to the stream through the SharePoint API and then call the (stream, boolean) signature of the Open method instead of what you're doing. The SharePoint folders don't reside on a physical drive so OpenXML's not going to know what to do with a URI string. http://msdn.microsoft.com/en-us/library/office/cc562185.aspx SPFile ...


I think the path your are considering would work. You would want to create an event receiver in Visual Studio that runs on item additions and changes. Microsoft has a lot of examples on using Open XML with Word: http://msdn.microsoft.com/en-us/office/ee358826.aspx and http://msdn.microsoft.com/en-us/library/cc850833.aspx. Microsoft also has a lot of ...

Only top voted, non community-wiki answers of a minimum length are eligible