Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Sat Sep 10, 2016 10:49 pm

I'm using the Spire.Presentation package (version to open a PowerPoint in an ASP.NET MVC 5 project and am running into an exception that states the file I'm trying to open is corrupt when opening via Presentation.LoadFromFile(). The exact message is "Microsoft PowerPoint 2007 file is corrpt.". I'm able to open the PowerPoint normally through PowerPoint 2016 so am not sure what the issue is. This code is also able to open about 50% of the PowerPoints I'm using without an issue but I can't figure out any significant differences between the files that open and those that don't.

Here's the relevant code:

Code: Select all
if (extension.Equals(".ppt") || extension.Equals(".pptx"))
    Spire.Presentation.Presentation presentation = new Spire.Presentation.Presentation();

    presentation.LoadFromFile(filePath); // this throws the exception

Is this a bug or is there an issue with my files? I can include some more information as well if the above is not sufficient.

Posts: 1
Joined: Sat Sep 10, 2016 10:46 pm

Mon Sep 12, 2016 8:14 am


Thanks for your inquiry. Could you please provide your document for looking into the issue ?

E-iceblue support team
User avatar

Posts: 35
Joined: Mon Sep 05, 2016 2:51 am

Return to Spire.Presentation