简体   繁体   中英

Reading & Writing Password Protected Excel Files in Azure

Is there a way (preferably an official Microsoft API) to read the contents of and generate password protected / encrypted Excel documents using C# .Net Framework in an Azure hosting environment?

Thanks.

The Office is not installed either on IaaS or PaaS Azure VMs and ADO.NET Jet OLE DB Provider doesn't support protected workbooks.

Consider exploring Open XML approach support password management in Excel files:

  1. Using System.IO.Packaging namespace in .NET (requires manual XML manipulation ):

  2. Pre-install Office Open XML SDK (as a startup task in case Azure PaaS VMs or just an regular install in case of Azure IaaS VMs): http://msdn.microsoft.com/en-us/library/office/bb448854(v=office.15).aspx and then check http://social.msdn.microsoft.com/Forums/office/en-US/b166e244-d762-4bec-945a-918181ef80ef/password-is-not-working-for-protected-work-sheet?forum=oxmlsdk

  3. Alternatively, you might have to use a 3rd party component either open source or from a known component provider - there are a few references to such components on these forums.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM