简体   繁体   中英

Loading a PPTX file directly using Interop Library from AWS S3 storage

My requirement is to load a PPTX file directly from AWS s3 storage. I'm using INTEROP to manipulate with Powerpoint files. So instead of downloading file from S3 to a specified location on server can I directly load the file from S3.

Here is my current code for loading PPTX file.

var pptPresentation = pptApplication.Presentations.Open(filePath, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse); 

Any suggestion would be helpful. Thanks

You have to download the file locally.

Note, the Considerations for server-side Automation of Office article states the following:

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.

You may consider using the Open XML SDK for manipulating open xml files. See Presentations (Open XML SDK) for a sample code.

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