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:


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 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. 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: and Microsoft also has a lot of ...


Your issue is that the openxml dll is not being deployed on the machine global assembly cache. Make sure your package is configured correctly.

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