asp.net - Generate Powerpoint file on the fly

前端 未结 6 1274
北荒
北荒 2021-02-20 10:11

I have a client of my web based application who heavily uses the data from our system for powerpoint presentations.

We currently allow data to export in more traditional

6条回答
  •  盖世英雄少女心
    2021-02-20 10:40

    In this article, Steve suggests using Aspose's Slide application.

    He also explains step by step on how to generate the PowerPoint file.

    Here are some code excerpts (in VB):

    Opening an existing PowerPoint file:

     Dim fs As  System.IO.FileStream = _
    
       New System.IO.FileStream("c:\mypath\myfile.ppt", _
    
       System.IO.FileMode.Open, System.IO.FileAccess.Read)
    
    Dim MyPres As Presentation = New Presentation(fs)
    
    fs.Close() 
    

    Looping the slides and outputting their template formats:

    Dim slides  As Slides = MyPres.Slides
    
    For i As Integer = 0 To slides.Count - 1
    
       Response.Write(MyPres.Slides(i).Layout.ToString + "
    ") Next

    In his article, he describes more in detail on how to do it.

提交回复
热议问题